Sharecodepoint App Download Qrcode Sharecodepoint Android App Banner
Now You can search anything in sharecodepoint using your voice. Click on mic button. Sharecodepoint Youtube Channel

Hi All, Please give your feedback on google. Your Feedback is Important to Us Write Feedback

Sharecodepoint popular queries

Saturday, 23 February 2019

Program to count the no of ‘scanf’ and ‘printf’ statements in a C program. Replace them with ‘readf’ and ‘writef’ statements respectively. | Compiler Design Programs | Lex Programs

Compiler Design Program Lab :

int pc=0, sc=0;
“printf” { fprintf(yyout,”writef”); pc++;}
“scanf” { fprintf(yyout,”readf”); sc++;}
int yywrap()
return 1;
main(int argc, char *argv[])
 printf(“Usage: <./a.out> <sourcefile> <destn file>\n”);
 printf(“No of printf statements = %d\n No of scanf
statements=%d\n”, pc, sc);


Post a Comment


Version - 2016 - 2019 - © Sharecodepoint | Made in India. | Copyright Content