×
NOTE!
Click on MENU to Browse between Subjects...
Advertisement
SYSTEM SOFTWARE AND OPERATING SYSTEM LABORATORY
[As per Choice Based Credit System (CBCS) scheme]
(Effective from the academic year 2017 - 2018)
SEMESTER - VI
Subject Code 17CSL67
IA Marks 40
Number of Lecture Hours/Week 01I + 02P
Exam Marks 60
17CSL67 - SYSTEM SOFTWARE AND OPERATING SYSTEM LABORATORY
Program 6 A
Write a LEX program to eliminate comment lines in a C program and copy the resulting program into a separate file.
Advertisement
Advertisement
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | %{ #include<stdio.h> int sl=0; int ml=0; %} %% "/*"[a-zA-Z0-9' '\t\n]+"*/" ml++; "//".* sl++; %% main() { yyin=fopen("f1.c","r"); yyout=fopen("f2.c","w"); yylex(); fclose(yyin); fclose(yyout); printf("\n Number of single line comments are = %d\n",sl); printf("\nNumber of multiline comments are =%d\n",ml); } |
Output
×
Note
Page Number is specified to navigate between Pages...
SYS = Syllabus
P = Program
-ADMIN
SYS = Syllabus
P = Program
-ADMIN
×
Note
Do Share the website link with Your Friends and known Students...
-ADMIN
-ADMIN
lIKE OUR CONTENT SUPPORT US BY FOLLOWING US ON INSTAGRAM : @futurevisionbie
Latest Updates are also posted in instagram as Stories...
For immediate Notification Join the Telegram Channel
Advertisement