Examveda

What will be the output of the following C code?
#include <stdio.h>
#include <string.h>
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: Option B


This Question Belongs to C Program >> File Input Output

Join The Discussion

Related Questions on File Input Output