Q24
Determine Output: void main() struct xx int x=3; char name[] = "hello"; ; struct xx *s = malloc(sizeof(struct xx)); printf("%d", s->x); printf("%s", s->name);
A.
3 hello
B.
Compiler Error
AnswerC.
Linking error
D.
None of these
Answer: Option B
Solution
Answer: Option B
Solution:
Initialization should not be done for structure members inside the structure declaration.