#include <stdio.h> #include <string.h> int main() { char *word="apple"; char letter='l'; char *e =strchr(word, letter); printf("position of %c is %d in %s", letter, (int)(e-word), word); return 0; }