Unix

1:

 Which of the following string functions can be used to find the last occurrence of a given character in a given string?

A.

strncmp

B.

strncpy

C.

strchr

D.

None of the above

 

Answer : C

Explanation :

strrchr( ) is the correct function. It returns a pointer to the last occurrence of the character specified as argument.

priya said: (5:16pm on Thursday 20th March 2014)
strchr is used to find the first occurance of the charcter so the option given is wrong
F. Shaikh said: (1:58am on Wednesday 25th October 2017)
the ans for the question is strrchr() which s not present in the options so the answer should be none of these of the given question.

Write your comments here:


Report Error
 

Option: A

Explanation : Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here.