CSPrograms4u
Nothing Succeeds Like Success
Home
About
C
Programs
Numbers
Patterns
Conversions
C Practical File
PPTs
CPP
Programs
PPTs
CG
Programs
PPTs
DS
Programs
PPTs
Python
Programs
Java
Programs
PPT
Practical File
C#
Programs
PPTs
VB
Programs
PPTs
VB 2010
Programs
PPTs
Sunday, 8 April 2018
Structure within Union
#include<stdio.h>
#include<conio.h>
union X
{
int a,b;
struct Y
{
int c,d;
}y;
}x;
void main()
{
clrscr();
x.a=10,x.b=20,x.y.c=30,x.y.d=40;
printf("First Number=%d\n",x.a);
printf("Second Number=%d\n",x.b);
printf("Third Number=%d\n",x.y.c);
printf("Fourth Number=%d",x.y.d);
getch();
}
No comments:
Post a Comment
Note: only a member of this blog may post a comment.
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Followers
Total Pageviews
Popular Posts
No comments:
Post a Comment
Note: only a member of this blog may post a comment.