?
Find the output of the following program:
Find the output of the following program:
void main()
{
struct xx
{
int x=3;
char name[]="hello";
};
struct xx *s;
printf("%d", s->x);
printf("%s", s->name);
}
void main()
{
struct xx
{
int x=3;
char name[]="hello";
};
struct xx *s;
printf("%d", s->x);
printf("%s", s->name);
}
Answer & Solution
Correct Answer:
Option
D
You cannot initialize members in structure declaration.
Join the Discussion
Login to post a comment or share your explanation.
Login