Sunday, 16 June 2019

Write a LEX program to count number of vowels from all inputted symbols.


              

               Code :

%{           
     int count_v;
%}
%%
[aeiouAEIOU]           {count_v++;}
%%
main()
{
     yylex();
     printf("Count of vowels= %d\n",count_v);
}
int yywrap()
{
     return 1;
}

No comments:

Post a Comment

It's time To increase blogging capability. To have a chance to contribute in digital world. Any Interested People who want to make t...