|char *strpbrk(const char *s1, const char *s2);|
s1 -The first string.
s2 -The second string.
char* -The pointer to the first character that match in the string address by ‘s1’ matching any character of the string address by s2.If no character of s2 matched in s1 NULL pointer is returned.
In C programming the <string.h> strpbrk function returns the first occurrence of the character in string ‘s1’ that match any of the character in ‘s2’.This function is similar with ‘strcpsn’ but ‘strcspn’ returns the index value of the character in s1 matching any character of ‘s2’.Read more about ‘strcspn’ function form the link given below.
Link : C strcspn string.h
ret=strpbrk(s1 , s3);
/* printf(“ret=%c”, *ret); //this pass an exception since we are trying to access a NULL pointer */
The first character of s2 ‘N’ matches the first character of ‘s1’ so ‘ret’ points to ‘N’ character.