write a c prgm to delete comments in any c prgm....

Status
Not open for further replies.

vandit

In the zone
1. Just open the file in the read-write + Binary mode using the File management functions.
2. read the lines from the files (check for newline character)
3. search for double-slashes and delete them(or replace them with a space ).
 

jxcess3891

Evil mind
Hi ....Frendz'........
plz guide me to write this prgm.......:???:

char = store chars of files in array;
while (!EOF){
if (char == '/*') {

while (*char++ != '/*') {

delete char; :p
char ++;
}

}
delete char;
}

This is the logic. My syntax is not good but u can work on it.
 
Status
Not open for further replies.
Top Bottom