Discussion :: Testing New
-
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);
}
Answer : Option B
Explanation :
Initialization should not be done for structure members inside the structure declaration.
Be The First To Comment