Welcome Guest | Sign in | Register
Structures - Discussion Page For Q.10498 | C Programming Questions and Answers | C Programming Free Online-Tests | LucentBlackBoard | LucentBlackBoard.com

Home > Java Programming > Structures > Questions and Answers

Q: What is the output of this program?
main()
{
struct xx
{
int x=3;
char name[]="hello";
};
struct xx *s;
printf("%d",s->x);
printf("%s",s->name);
}
A. 3 B. Compile Error
C. hello D. null

Answer and Explanation

Answer:Compile Error

Explanation:
You should not initialize structure variables in declaration.

Comment on this Question

Name:

Loading...




Partner Sites
LucentBlackBoard.com                  SoftLucent.com                  LucentJobs.com
All rights reserved © 2012-2015 SoftLucent.