C Programming String Multiple choice question

Exercise :: String - General Questions

This section contains a lot of Question with answer and explanation.

2) What would be the output of the following C programs ?

#include <stdio.h> int main() { char *ch = "pt"; char *ch1 = "pt"; if (strcmp(ch, ch1)) printf("equal"); else printf("unequal"); }

A. equal
B. unequal
C. Run Time Error
D. Compilation Error




( B )

Explanation :

No explanations available for this question.