String h C Tutorial

Item Value
Header filestring.h
Declarationchar *strchr(const char *str, int ch);
Returnreturns a pointer to the first occurrence of ch in *str or a null pointer if not found.

#include 
  #include 
  int main(void)
  {
    char *p;
    p = strchr("this is a test", ' ');
    printf(p);
    return 0;
  }
is a test