Write a C program in a Unix Operating System to count number of word in a file. The main process will read from the user the file name and a positive number N which represents the number of lines in this file. Accordingly, the main process will greate N processes. E#ach process i will count and print the numbe of words in i-th line of the input file, where 1<= i >=n. The children processes should be implemented using the system call exec. Finally, the main rocess should print out the total number of words in the input file.
2006-07-02
19:41:36
·
4 answers
·
asked by
wrood a
1
in
Computers & Internet
➔ Programming & Design