Posted on 2003-10-24
This is my code:
fptr = fopen("data.txt","r");
if(fptr == NULL)
Is there a way to execute this program with the first parameter as the
"-f" and the second parameter as the name of the textfile?. Then
the program will read the contents of the textfile and display.
Do we incoperate the -f as part of the program. Does it do any sort of validation or functionality. Please include some examples.
P.S I know the command line arguments.