C – Strchr

C – Strchr 2017-07-19T23:28:43+00:00

Strchr :

Syntax:
#include<string.h>
char *strchr( const char *str, int ch );

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.

C – STRCHR EXAMPLE PROGRAM :

Output :

Before :

str : cprogrammingexpert

strchr(str,G):Mode

After:

str: learnerMode

Prev Next