#include <stdio.h>
#include <stdlib.h>
void main()
{
int i,j,n,c[10];
char *str,ch;
str=(char*)malloc(20);
printf("enter the string: ");
fgets(str,sizeof(str),stdin);
n=strlen(str);
printf("%d",n);
j=1;
c[1]=0;
for(i=0;i<n;i++)
{
ch=tolower(str[i]);
if(ch== '')
{
j++;
c[j]=0;
}
if(ch=='a'||ch='e'||ch='i'||ch=='o'||ch=='u')
c[j]++;
}
printf("no of vowels in each word in given line is \n");
for(i=1;i<=j;i++)
{
printf("word is %d-->%d\n",i,c[i]);
}
}
in this i have to count the number of vowels in each word the compiler say the error is at here at 18th line if(ch== '')