Saturday, 8 September 2018

Write a LEX program to check whether input symbol is number or character.


               Code :

%{
%}
%%
[0-9] {printf("Input is a number");}
[A-Za-z] {printf("Input is a character");}
%%
main()
{
     yylex();
}
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...