Question: Write a well-commented C program that accepts the name of a file and a field-number from the user, and then reads that file and for
Write a well-commented C program that accepts the name of a file and a "field-number" from the user, and then reads that file and for each line in that file prints on the terminal word at position "field-number" and also writes the word into an output file. For example, if the input file as the following lines:
C is a programming language.
lex produces a lexical analyser
cc is a compiler
and if the field-number specified is 4, then the output of the program is:
programming
lexical
(NULL) compiler
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
