Using your phone's internet browser
go to:
Click and drag this link to
the Home icon in your browser.

Write a lex program to count the number of comment lines in a given C program .Also eliminate them and copy that program into seperate file

About: LEX programs for III sem MCA

29 Nov '08 07:43 pm
  Invite a friend  |  
  Save  |  
 Earn 10 points for answering
Answer this question  Earn 10 points for answering    
4000 characters remaining  
Keep me signed inNew User? Sign up

Answers (1)


int comments=0;

"//".* {comments++;}
"/*"[a-zA-Z0-9n]*"*/" {comments++;}
Answered by RAVIMOHAN KAIVAR, 13 Sep '09 10:01 pm

Report abuse
Not Useful
Your vote on this answer has already been received

Ask a Question

Get answers from the community

600 characters remaining