Home » C Programming » Strings » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    int main()
    {
    char *s = "Interview, Mania";
    char *s1 = "Interview, Mania";
    if (strcmp(s, s1))
    {
    printf("Equal");
    }
    else
    {
    printf("Not Equal");
    }
    }
    1. Compilation Error
    2. Equal
    3. Garbage value
    4. Not Equal
    5. None of these
Correct Option: D

Not Equal



Your comments will be displayed only after manual approval.