C – Strchr

C – Strchr 2017-08-06T09:13:33+00:00

Strchr :

strchr(str,ch)  finds ch in str. Returns a pointer to the first occurrence of the character ch in str, if ch does not occur in str ,strchr returns NULL.

Syntax:
char *strchr( const char *str, int ch );

C – STRCHR EXAMPLE PROGRAM :

Output :

Before :

str : cprogrammingexpert

strchr(str,G):Mode

After:

str: learnerMode

Prev Next