Question discussion

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

284976Medium 1 reply 560 views
19
The library function used to find the last occurrence of a character in a string is
  • Alaststr()
  • Bstrstr()
  • Cstrnstr()
  • Dstrrchr()
  • ENone of these
Correct answer: D

Discussion 1

0
CCommunity
strrchr()

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

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