C Programming String Multiple choice question

Exercise :: String - General Questions

This section contains a lot of Question with answer and explanation.

4) The library function used to find the last occurrence of a character in a string is
A. strrchr()
B. strnstr()
C. strstr()
D. None of the Above

Answer:

strrchr()

Option:

( A )


Explanation :

Declaration: char *strrchr(const char *s, int c); It scans a string s in the reverse direction, looking for a specific character c.