Lex Program to Check String Palindrome
This is the lex program to check whether the given string is palindrome or not. [cc lang=”c”] %{ #include char num,temp[100]; int rev=0; char arr[100]; %} %% . scanf(“%s”,arr); temp=arr; while(temp!=0){rev=rev*10+(temp%10); temp/=10;} if(rev==num) printf(“PALI”);...
Recent Comments