#include<stdio.h>

main()

{

struct xx

{

int x;

struct yy

{

char s;

struct xx *p;

};

struct yy *q;

};

}



#include<stdio.h> main() { struct xx { int x; ..

Answer / susie

Answer :

Compiler Error

Explanation:

The structure yy is nested within structure xx.
Hence, the elements are of yy are to be accessed through the
instance of structure xx, which needs an instance of yy to
be known. If the instance is created after defining the
structure the compiler will not know about the instance
relative to xx. Hence for nested structure yy you have to
declare member.

Is This Answer Correct ?    4 Yes 3 No

Post New Answer

More C Code Interview Questions

void main() { while(1){ if(printf("%d",printf("%d"))) break; else continue; } }

1 Answers  


posted by surbhi just now main() { float a = 5.375; char *p; int i; p=(char*)&a; for(i=0;i<=3;i++) printf("%02x",(unsigned char) p[i]); } how is the output of this program is :: 0000ac40 please let me know y this output has come

2 Answers   GATE,


main() { char *p; p="%d\n"; p++; p++; printf(p-2,300); }

1 Answers  


main() { int i=5; printf("%d",++i++); }

1 Answers  


Sorting entire link list using selection sort and insertion sort and calculating their time complexity

1 Answers   Infosys, Microsoft, NetApp,


#include<stdio.h> main() { int i=1,j=2; switch(i) { case 1: printf("GOOD"); break; case j: printf("BAD"); break; } }

1 Answers  


source code for delete data in array for c

1 Answers   TCS,


main() { extern int i; i=20; printf("%d",sizeof(i)); }

2 Answers  


what is the code of the output of print the 10 fibonacci number series

2 Answers  


How to swap two variables, without using third variable ?

104 Answers   AB, ADP, BirlaSoft, Cisco, Cygnet Infotech, HCL, Hewitt, Honeywell, HP, IBM, Infosys, Manhattan, Microsoft, Mobius, Percept, Satyam, SofTMware, TCS, Wipro, Yamaha,


main() { int i=5; printf("%d%d%d%d%d%d",i++,i--,++i,--i,i); }

7 Answers  


Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it.

2 Answers   Wipro,


Categories