C - Pointers - Discussion

You Are Here :: Home > C > Pointers - Discussion

 



Q.

#include

main()
{
struct xx
{
int x=3;
char name[]="hello";
};
struct xx *s;
printf("%d",s->x);
printf("%s",s->name);
}

A. Hello B. 3
C. 3 Hello D. Compiler Error

Answer: Option D
Explaination:

You should not initialize variables in declaration.



Discussion

Your Comments Goes here...
NameDiscussion