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 number of vowels and consonants in a given string | Compiler Design | Lex Programs


Compiler Design Lap Program : 

%{
 #include<stdio.h>
 int vowels=0;
 int cons=0;
%}
%%
[aeiouAEIOU] {vowels++;}
[a-zA-Z] {cons++;}
%%
int yywrap()
{
return 1;
}
main()
{
 printf(“Enter the string.. at end press ^d\n”);
 yylex();
 printf(“No of vowels=%d\nNo of consonants=%d\n”,vowels,cons);

0 comments:

Post a Comment

 

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