1.

What is the function of the strcmp() function?(a) To compare two strings(b) To compile two strings(c) To concatenate two strings(d) To converge two stringsThis question was addressed to me in a job interview.I need to ask this question from String Manipulation topic in division Arduino Programming of Arduino

Answer»

Right ANSWER is (a) To compare TWO strings

For explanation I WOULD say: The strcmp() FUNCTION takes in two arguments to work and it’s JOB is to compare two strings. it returns 0 if the first and second strings are the same, returns a number greater than 0 if the first string is greater than the second one and vice versa.



Discussion

No Comment Found

Related InterviewSolutions