ExamVeda
Login
Home
This question belongs to C Program Structure And Union
Structure and Union
?

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);
}

Answer & Solution
Correct Answer: Option D

You cannot initialize members in structure declaration.

Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.