1.

which of the following function returns a pointer to the located string or a null pointer if string is not found.(a) strtok()(b) strstr()(c) strspn()(d) strrchr()I got this question in my homework.This intriguing question originated from String Operations in division String Operations in C of C

Answer»

Right option is (b) strstr()

Easy explanation - The strstr() FUNCTION is used to RETURN a POINTER to the located string, or if string is not FOUND a NULL pointer is returned.



Discussion

No Comment Found

Related InterviewSolutions