to get a line of text and count the number of vowels in it
Answer Posted / chandra sekhar kommuri
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char st[100];
int i,count=0;
clrscr();
printf("Enter line of text:");
gets(st);
for(i=0;st[i]!='\0';i++)
switch(st[i])
{
case 'a':
case 'A':
case 'e':
case 'E':
case 'i':
case 'I':
case 'o':
case 'O':
case 'u':
case 'U':count++;
}
printf("\n Number of vowels:%d",count);
getch();
}
| Is This Answer Correct ? | 75 Yes | 24 No |
Post New Answer View All Answers
Array is an lvalue or not?
Explain #pragma statements.
Please send me WIPRO technical question to my mail ID.. its nisha_g28@yahoo.com please its urgent
I just typed in this program, and it is acting strangely. Can you see anything wrong with it?
how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12
What are compound statements?
What is string length in c?
What is the Purpose of 'extern' keyword in a function declaration?
Explain is it valid to address one element beyond the end of an array?
In a switch statement, what will happen if a break statement is omitted?
Explain how are portions of a program disabled in demo versions?
What are the different types of constants?
When do we get logical errors?
Do array subscripts always start with zero?
What is the purpose of scanf() and printf() functions?