Information
This is the input file: input1.txt:
The file after running the program on it: output1.txt/************************************* A simple header comment *************************************/ int main(void) /* help */ { /* a comment before */ /* in front */ int a = 8/4; /* at end */ /* a comment after */ return a; }
The border shows you that there is one blank line above the line containing main. There is also one blank line above the int a line and 2 blank lines below it.int main(void) { int a = 8/4; return a; }
This is the prototype for the function:
and this is the command line to compile it:void stripcom(const char *filename);
Additional tests:gcc -O -Werror -Wall -Wextra -ansi -pedantic main.c stripcom.c -o stripcom
Here is a simple driver file: (main.c, HTML Text) You must specify the filename on the command line like this:
stripcom foo.c
However, you might want to take up that challenge after you've submitted this practice.printf("The word \"foo\" is in double-quotes");
with filename replaced by the actual file you were trying to open.Can't open filename