1.

Which code from the given option return pointer to last occurrence of c in ch or NULL if not present?(a) char *strchr(ch, c)(b) char *strrchr(ch, c)(c) char *strncat(ch, c)(d) char *strcat(ch, c)The question was posed to me in homework.Query is from String Operations topic in division String Operations in C of C

Answer»

Right option is (b) CHAR *strrchr(ch, c)

For EXPLANATION: The FUNCTION char *strrchr(ch, c)returns pointer to last OCCURRENCE of c in ch or NULL if not present.



Discussion

No Comment Found

Related InterviewSolutions