Find the O/p of the following

struct node
{
char *name;
int num;
};
int main()
{
struct node s1={"Harry",1331};
struct node s2=s1;
if(s1==s2)
printf("Same");
else
printf("Diff");
}



Find the O/p of the following struct node { char *name; int num; }; int main..

Answer / sinchan garai

this gives a compile time error.because the coditional
statement "if(s1==s2)" written in the code is not allowable
in C.

Is This Answer Correct ?    4 Yes 2 No

Post New Answer

More C Interview Questions

The operation of a stair case switch best explains the a) or operation b) and operation c)exclusive nor operation d)exclusive or operation Which of the following is/are syntactically correct? a) for(); b) for(;); c) for(,); d) for(;;);

1 Answers   HCL, Public Service Commission,


main() { int *ptr=(int*)malloc(sizeof(int)); *ptr=4; printf("%d",(*ptr)+++*ptr++); }

2 Answers  


What's the difference between constant char *p and char * constant p?

0 Answers   Celstream,


What is #define?

0 Answers  


How can I get random integers in a certain range?

0 Answers  


how do you write a function that takes a variable number of arguments? What is the prototype of printf () function?

0 Answers   TCS,


A program is required to print your biographic information including: Names, gender, student Number, Cell Number, line of study and your residential address.

0 Answers  


write a program to print data of 5 five students with structures?

0 Answers  


Explain the red-black trees?

0 Answers  


main() { charx; while (x=0;x<=255;x++) printf("\nAscii value %d Character %c,x,x); }

2 Answers  


Why c is called object oriented language?

0 Answers  


What is that continue statement??

4 Answers  


Categories