can u please send me the code i tried using loop but didnt got success in that its not my assignment but im learning some techniques of C++.help me in this regard.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
char* s[]={"we will teach you hoe to.....","move a mountain'","level a building","ill teach yo"};
int size = sizeof(s)/sizeof(char*);
int count = 0;
printf("Size of Array : %d\n",size);
for (int i = 0; i < size; i++)
{
char * pch;
printf ("Looking for the 'e' character in \"%s\"...\n",s[i]);
pch=strchr(s[i],'e');
while (pch!=NULL)
{
printf ("found at %d\n",pch-s[i]+1);
count++;
pch=strchr(pch+1,'e');
}
}
printf("Count of 'e' : %d\n",count);
getchar();
return 0;
}