Homework 6 ex 3

Homework 6 ex 3

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 word 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 which contains a function void ex3() that realizes the requirement as is specified in the description.

Input Files

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

the length of one line is less than 20000

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

i

Output: count.txt

3

Limitation

1s, 32MiB for each test case.

Homework 6

Not Claimed
Status
Finished
Problems
6
Open Since
2022-11-05 00:00
DDL
2022-11-18 23:59
Extension
24.0 hour(s)