wat is the output
int main()
{
char s1[]="Hello";
char s2[]="Hello";
if(s1==s2)
printf("Same");
else
printf("Diff");
}

















Answers were Sorted based on User's Feedback



wat is the output int main() { char s1[]="Hello"; char s2[]="Hello&quo..

Answer / prachi

ans is diff

Is This Answer Correct ?    15 Yes 2 No

wat is the output int main() { char s1[]="Hello"; char s2[]="Hello&quo..

Answer / jitendra nath das

Ans is Diff.

Is This Answer Correct ?    8 Yes 0 No

wat is the output int main() { char s1[]="Hello"; char s2[]="Hello&quo..

Answer / sumesh

ITS A WRONG METHOD TO COMPARISON OF TWO STRINGS..SO OUTPUT WILL BE CAN NOT CONVERT int * TO char *.


THANKS...

Is This Answer Correct ?    3 Yes 1 No

Post New Answer

More C Interview Questions

List some basic data types in c?

1 Answers  


Toggle nth bit in a given integer - num

5 Answers   Qualcomm,


How do we print only part of a string in c?

1 Answers  


while initialization of two dimensional arrays we can initialize like a[][2] but why not a[2][] is there any reason behind this?

4 Answers   Aptech,


what value is returned to operating system after program execution?

1 Answers  


What is a segmentation fault?

2 Answers  


which operator having highest precedence? a.)+ b.)++ c.)= d.)%

4 Answers  


What is null pointer in c?

1 Answers  


int i; i=2; i++; if(i=4) { printf(i=4); } else { printf(i=3); } output of the program ?

15 Answers   Mascot,


What will the code below print when it is executed?   int x = 3, y = 4;         if (x = 4)                 y = 5;         else                 y = 2;         printf ("x=%d, y=%d ",x,y);

1 Answers  


What is the difference between realloc() and free()

1 Answers  


What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file

1 Answers  


Categories