πŸ“Š C Programming
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
πŸ’¬ Discuss
βœ… Correct Answer: (C) 0

Explanation: strcmp returns 0 when both strings are equal.

Explanation by: Mr. Dubey
strcmp returns 0 when both strings are equal.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
42
Total Visits
πŸ“½οΈ
9 mo ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
91%
Success Rate