Spring 1998
Assignment 9
(due Friday 98.04.17 at 5 p.m. in room MCS 138)
-
[4 points] Exercise 8.10, page 357.
Before handing in your assignment, test your program on the two strings
in the data file
~cs111/DataFiles/data_file_for_hwk_9_1
Each of the two input strings is on a different line. Compare them
up to the first 5 characters, then up to the first 10 characters, and finally
up to the first 15 characters.
-
[4 points] Exercise 8.16, page 358.
Before handing in your assignment, test your program on the two strings
in the data file
~cs111/DataFiles/data_file_for_hwk_9_2
The first string in this file occupies up to 5 lines, followed by an
empty line, followed by the search string in a single line. Recall that
each line is 80 characters. We want you to search for only the two first
occurrences of the search string. You may find it convenient to use the
function "gets()" in the header file "stdio.h".
Assaf Kfoury
Created: 98.04.10