#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

what is brs test reply me email me kashifabbas514@gmail.com

0 Answers  


print numbers till we want without using loops or condition statements like specifically(for,do while, while swiches, if etc)!

11 Answers   Wipro,


#define assert(cond) if(!(cond)) \ (fprintf(stderr, "assertion failed: %s, file %s, line %d \n",#cond,\ __FILE__,__LINE__), abort()) void main() { int i = 10; if(i==0) assert(i < 100); else printf("This statement becomes else for if in assert macro"); }

1 Answers  


Finding a number multiplication of 8 with out using arithmetic operator

8 Answers   Eyeball, NetApp,


Is the following code legal? void main() { typedef struct a aType; aType someVariable; struct a { int x; aType *b; }; }

1 Answers  






how to create a 3x3 two dimensional array that will give you the sums on the left and bottom columns

0 Answers  


WAP to display 1,2,3,4,5........N

2 Answers  


main( ) { int a[2][3][2] = {{{2,4},{7,8},{3,4}},{{2,2},{2,3},{3,4}}}; printf(ā€œ%u %u %u %d \nā€,a,*a,**a,***a); printf(ā€œ%u %u %u %d \nā€,a+1,*a+1,**a+1,***a+1); }

2 Answers  


#include<stdio.h> main() { const int i=4; float j; j = ++i; printf("%d %f", i,++j); }

1 Answers  


how to test pierrot divisor

0 Answers  


Program to Delete an element from a doubly linked list.

4 Answers   College School Exams Tests, Infosys,


can you use proc sql to manpulate a data set or would u prefer to use proc report ? if so why ? make up an example and explain in detail

0 Answers   TCS,


Categories