c programing Write a program to read in a string from the ke
c programing
Solution
#include<stdio.h>
int main()
{
char *str;
printf(\"enter string :\");
scanf(\"%s\",&str);
printf(\"\ here are the vowels and their positions\");
for(int i=0;i<str.length();i++)
{
char c=tolower(str[i]);
if(c==\'a\'||c==\'e\'||c==\'i\'||c==\'o\'||c==\'u\')
printf(\"\ %c\\t\\t %d\",c,i);
}
return 0;
}
