#include <stdio.h>
#include <string.h>
int main()
{
char s[32] = "Quickly get a project started", *p;
p = (char *)memchr(s, 'g', 32);
if (p != NULL)
printf("'g' found at index: %d\n", p - s);
else
printf("'g' not found\n");
return 0;
}
/*
run:
'g' found at index: 8
*/