#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

To reverse an entire text file into another text file.... get d file names in cmd line

0 Answers   Subex,


main ( ) { static char *s[ ] = {“black”, “white”, “yellow”, “violet”}; char **ptr[ ] = {s+3, s+2, s+1, s}, ***p; p = ptr; **++p; printf(“%s”,*--*++p + 3); }

1 Answers  


How to read a directory in a C program?

4 Answers  


write a program in c to merge two array

2 Answers  


Write a function to find the depth of a binary tree.

13 Answers   Adobe, Amazon, EFI, Imagination Technologies,






void main() { char a[]="12345\0"; int i=strlen(a); printf("here in 3 %d\n",++i); }

3 Answers  


why do you use macros? Explain a situation where you had to incorporate macros in your proc report? use a simple instream data example with code ?

0 Answers  


Under linux environment can u please provide a c code for computing sum of series 1-2+3-4+5......n terms and -1+2-3+4-5...n terms..

2 Answers  


main() { int i=400,j=300; printf("%d..%d"); }

3 Answers  


void main() { unsigned giveit=-1; int gotit; printf("%u ",++giveit); printf("%u \n",gotit=--giveit); }

1 Answers  


Write a single line c expression to delete a,b,c from aabbcc

2 Answers   Microsoft,


main() { char *a = "Hello "; char *b = "World"; clrscr(); printf("%s", strcat(a,b)); } a. Hello b. Hello World c. HelloWorld d. None of the above

3 Answers   HCL,


Categories