adplus-dvertising
frame-decoration

Question

What is the output of this program?
#include <stdio.h>
int main()
{
    char s1[] = "Hello";
    char s2[] = "Hello";
    if(s1 == s2)
        printf("Same");
    else
        printf("Not Same");
    return 0;
}

a.

Not Same

b.

Same

c.

Compilation Error

d.

None of the above

Posted under Strings C Programming

Answer: (a).Not Same

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of this program?