#include<stdio.h>

main()

{

struct xx

{

int x;

struct yy

{

char s;

struct xx *p;

};

struct yy *q;

};

}

Answers were Sorted based on User's Feedback



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

Answer / susie

Answer :

Compiler Error

Explanation:

in the end of nested structure yy a member have to be
declared.

Is This Answer Correct ?    8 Yes 0 No

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

Answer / dayana benny

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 ?    3 Yes 0 No

Post New Answer

More C Code Interview Questions

main( ) { int a[ ] = {10,20,30,40,50},j,*p; for(j=0; j<5; j++) { printf(“%d” ,*a); a++; } p = a; for(j=0; j<5; j++) { printf(“%d ” ,*p); p++; } }

1 Answers  


Is the following statement a declaration/definition. Find what does it mean? int (*x)[10];

1 Answers  


write a program to Insert in a sorted list

4 Answers   Microsoft,


Design an implement of the inputs functions for event mode

0 Answers   Wipro,


main() { char *p; int *q; long *r; p=q=r=0; p++; q++; r++; printf("%p...%p...%p",p,q,r); }

1 Answers  


Write a routine to implement the polymarker function

0 Answers   TCS,


Develop a routine to reflect an object about an arbitrarily selected plane

0 Answers  


I need your help, i need a Turbo C code for this problem.. hope u'll help me guys.? Your program will have a 3x3 array. The user will input the sum of each row and each column. Then the user will input 3 values and store them anywhere, or any location or index, temporarily in the array. Your program will supply the remaining six (6) values and determine the exact location of each value in the array. Example: Input: Sum of row 1: 6 Sum of row 2: 15 Sum of row 3: 24 Sum of column 1: 12 Sum of column 2: 15 Sum of column 3: 18 Value 1: 3 Value 2: 5 Value 3: 6 Output: Sum of Row 1 2 3 6 4 5 6 15 7 8 9 24 Sum of Column 12 15 18 Note: Your program will not necessary sort the walues in the array Thanks..

0 Answers  


func(a,b) int a,b; { return( a= (a==b) ); } main() { int process(),func(); printf("The value of process is %d !\n ",process(func,3,6)); } process(pf,val1,val2) int (*pf) (); int val1,val2; { return((*pf) (val1,val2)); }

1 Answers   Satyam,


main() { int i=_l_abc(10); printf("%d\n",--i); } int _l_abc(int i) { return(i++); }

2 Answers  


What is the output for the program given below typedef enum errorType{warning, error, exception,}error; main() { error g1; g1=1; printf("%d",g1); }

1 Answers  


write a c-program to find gcd using recursive functions

5 Answers   HTC, Infotech,


Categories