h6ex3: Strings and file I/O

h6ex3: Strings and file I/O

You cannot submit for this problem because the homework's deadline is due.

Description

Write a program to find the number of times a given string occurs in a sentence. The program should read the sentence from a file called sentence.txt and the word from a file called word.txt. The output should be printed in a file count.txt.

Format

Files

You should submit a tar file containing a c source file ex3.c

Input Files

a sentence in sentence.txt and a word in word.txt

the length of one line is less than 10000

Output Files

an integer in count.txt

Sample 1

Input: sentence.txt

letter from a birmingham jail king jr 16 april 1963 my dear fellow clergymen while confined here in the birmingham city jail i came across your recent statement calling my present activities unwise and untimely seldom do i pause to answer criticism of my work and ideas if i sought to answer all the criticisms that cross my desk

Input: word.txt

the

Output: count.txt

2

Limitation

1s, 32MiB for each test case.

Assignment 6

Not Claimed
Status
Finished
Problems
6
Open Since
2018-07-01 00:00
DDL
2018-07-10 14:00
Extension
240.0 hour(s)