// WAP to display the union elements.
#include<iostream.h>
#include<conio.h>
union sample
{
int x;
};
void main()
{
clrscr();
sample a;
a.x=10;
cout<<"\ncontent of x="<<a.x<<endl;
getch();
}
No comments:
Post a Comment
Note: only a member of this blog may post a comment.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.