Tuesday 6 January 2015

Program To Search A Word In Given Files : C language

Hi,
Here is a C program to search for a string-of-characters in given files line-by-line. That is, it searches for the required search key in each line of the file and prints the no. of occurrences in that line.
It takes a string-of-characters and any number of files separated with space as input via arguments. It uses ANSI C  standard library functions.

NOTE: During execution, if the string-of-characters or file-names has white-spaces in its name, QUOTE that.
 Ex: file-name.exe "I am" "file1.txt" "file2.txt" 
Download file from here

No comments:

Post a Comment