Problem with pointers
Saturday, February 23, 2008
Question : Union
Question
main()
{
union a
{
int i;
char ch[2];
};
union a u;
u.ch[0]=3;
u.ch[1]=2;
printf("%d %d %d",u.ch[0],u.ch[1],u.i);
}
o/p is:3 2 515......how??
Solution
No comments:
Post a Comment
Older Post
Home
Subscribe to:
Post Comments (Atom)
Blog Archive
▼
2008
(2)
▼
February
(2)
Question : Union
A problem with pointer conversion
About Me
subtoodle
View my complete profile
No comments:
Post a Comment