Question: The followving code skips line comments and block comments in a C/C++ program: II get two consecutive characters char cl, c2; cl - getc(inputFile); c2
The followving code skips line comments and block comments in a C/C++ program: II get two consecutive characters char cl, c2; cl - getc(inputFile); c2 getc(inputFile); // skip a block comment cl-c2; c2=getc(inputFile); // skip a line comment while(c2 ') { cl-c2 c2-getc(inputFile); Complete the following program that reads a C/C++source file with comments and produces a pure source file without comments. Compile and test your program. The command line of this program is: skip file-with-comments file-without-comments center> Il skip.cpp #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
