#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  


why the range of an unsigned integer is double almost than the signed integer.

1 Answers  


main() { while (strcmp(“some”,”some\0”)) printf(“Strings are not equal\n”); }

1 Answers  


What are the files which are automatically opened when a C file is executed?

1 Answers  


void pascal f(int i,int j,int k) { printf(“%d %d %d”,i, j, k); } void cdecl f(int i,int j,int k) { printf(“%d %d %d”,i, j, k); } main() { int i=10; f(i++,i++,i++); printf(" %d\n",i); i=10; f(i++,i++,i++); printf(" %d",i); }

1 Answers  






main() { printf("%d, %d", sizeof('c'), sizeof(100)); } a. 2, 2 b. 2, 100 c. 4, 100 d. 4, 4

18 Answers   HCL, IBM, Infosys, LG Soft, Satyam,


void ( * abc( int, void ( *def) () ) ) ();

1 Answers  


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

1 Answers   Value Labs,


There is a lucky draw held every day. if there is a winning number eg 1876,then all possible numbers like 1867,1687,1768 etc are the numbers that match irrespective of the position of the digit. Thus all these numbers qualify fr the lucky draw prize Assume there is no zero digit in any numbers. write a program to show all the possible winning numbers if a "winning number"is passed as an arguments to the function.

1 Answers   Nagarro,


How we print the table of 2 using for loop in c programing?

14 Answers   HCL, Wipro,


main() { char p[ ]="%d\n"; p[1] = 'c'; printf(p,65); }

2 Answers  


main() { clrscr(); } clrscr();

2 Answers  


Categories