Code Snippets C

#include
#include
int main ()
{
char str[] = "I am Superman";
char *j;
printf ("Looking for 's' character in \"%s\"...\n", str);
j = strchr(str, 's');
while (j != NULL) {
printf ("found at %d\n",j - str + 1);
j = strchr(j + 1, 's');
}
return 0;
}