How to remove blank spaces and comments while reading data from a file in C?
I want to read data from file and print the contents of the file.While reading it must ignore the blank lines and comment lines.How to do this?Pls help me.
Re: How to remove blank spaces and comments while reading data from a file in C?
if u r reading the file character by character..ignore the character read whenever there is a space ...tab...newline..or any other white space ...
and if u store the contents in a buffer then traverse the buffer and remove whitespace before printing it ..
to remove comments u should know what a comment in your file looks like..
can a comment be multi-line comment or will it be a single line comment...
|All times are GMT +5.5. The time now is 00:44.|