C Language : Arrays

Which of the following function can be used to find the first occurrence of a given string in another string? , Which of the following function can be used to find the first occurrence of a given string in another string?

Which of the following function can be used to find the first occurrence of a given string in another string?




Solution
C. strstr( )



Explanation
strstr is a C standard library string function as defined in string.h. strstr() has the function signature char * strstr(const char *haystack, const char *needle); which returns a pointer to a character at the first index where needle is in haystack, or NULL if not present.
CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Exam Quiz Website development Company in Allahabad