#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
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 |
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 |
why the range of an unsigned integer is double almost than the signed integer.
Is the following code legal? void main() { typedef struct a aType; aType someVariable; struct a { int x; aType *b; }; }
source code for delete data in array for c
abcdedcba abc cba ab ba a a
main() { int x=5; clrscr(); for(;x==0;x--) { printf("x=%d\nā", x--); } } a. 4, 3, 2, 1, 0 b. 1, 2, 3, 4, 5 c. 0, 1, 2, 3, 4 d. none of the above
main() { int i=-1; -i; printf("i = %d, -i = %d \n",i,-i); }
void main() { int const * p=5; printf("%d",++(*p)); }
3 Answers Infosys, Made Easy, State Bank Of India SBI,
void main() { char ch; for(ch=0;ch<=127;ch++) printf(ā%c %d \nā, ch, ch); }
void main() { void *v; int integer=2; int *i=&integer; v=i; printf("%d",(int*)*v); }
#include<stdio.h> main() { struct xx { int x=3; char name[]="hello"; }; struct xx *s; printf("%d",s->x); printf("%s",s->name); }
void main() { unsigned giveit=-1; int gotit; printf("%u ",++giveit); printf("%u \n",gotit=--giveit); }
main() { int x=5; clrscr(); for(;x<= 0;x--) { printf("x=%d ", x--); } } a. 5, 3, 1 b. 5, 2, 1, c. 5, 3, 1, -1, 3 d. ā3, -1, 1, 3, 5