ExamVeda
Login
Home
This question belongs to C Program Arrays And Strings
Arrays and Strings
?

What is the return value of the following statement if it is placed in C program? strcmp("ABC", "ABC");

Answer & Solution
Correct Answer: Option D

strcmp(s1, s2);
returns int as follows:
== 0, when s1 == s2
< 0, when s1 < s2
> 0, when s1 > s2

Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.