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

You have an array of n integers, randomly ordered with value 1 to n-1.The array is such that there is only one and one value occurred twice. How will you find this number?

1 Answers  


There are 21 people in a room. They have to form groups of 3 people each. How many combinations are possible? Write a C program to print the same.

1 Answers   HCL, iGate,


What is a header file?

0 Answers  


What is call by reference in functions?

1 Answers  


What is array within structure?

0 Answers  


1)what are limitations for recursive function? 2)write a program to read a text file and count the number of characters in the text file

1 Answers  


write function to reverse char array ... without using second array

3 Answers  


What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?

0 Answers   Aspire, Infogain,


what is the size of an integer variable?

4 Answers  


program to print upper & lower triangle of a matrix

2 Answers   TCS,


main() { inta=10,b=20; a>=5?b=100:b=200; printf("%d ",b); }

0 Answers   Wilco,


What is the incorrect operator form following list(== , <> , >= , <=) and what is the reason for the answer?

0 Answers  


Categories