Examveda
Examveda

The library function used to find the last occurrence of a character in a string is

A. laststr()

B. strstr()

C. strnstr()

D. strrchr()

E. None of these

Answer: Option D

Solution(By Examveda Team)

Declaration: char *strrchr(const char *s, int c);

It scans a string s in the reverse direction, looking for a specific character c.


This Question Belongs to C Program >> Arrays And Strings

Join The Discussion

Related Questions on Arrays and Strings