A

Admin • 833K Points
Coach

Q. What is the output of this function call?

Code:
#include <stdio.h>
int main() {
printf("%d", strcmp("abc", "abc"));
return 0;
}
  • (A) -1
  • (B) 1
  • (C) 0
  • (D) Compilation Error
  • Correct Answer - Option(C)
  • Views: 25
  • Filed under category C Programming
  • Hashtags:

Explanation by: Admin

strcmp returns 0 when both strings are equal.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.