Top

Discussion

What will be the output of the following C code?

#include 
    int main()
    {
        char *str = "hello, world";
        char *str1 = "hello, world";
        if (strcmp(str, str1))
            printf("equal");
        else
            printf("unequal");
    }

 

  • A.equal
  • B.unequal
  • C.Compilation error
  • D.Depends on the compiler

Answer: B

No answer description available for this question.
 

No comment is present. Be the first to comment.
Loading…

Post your comment