Pages

Monday 21 May 2012

program to print that all members of union storage location is one


115./*Write a program to print that all members of union storage location is one*/
#include<conio.h>
union math
{
int a,b;
}value;
void main()
{
clrscr();
printf("\n Enter Numer-A-:");
scanf("%d",&value.a);
printf("Firsst Time Value of A is:%d\n",value.a);
printf("\n Enter Number-B-:");
scanf("5d",&value.b);
printf("Now Value of A is:%d\nand Value of B is:%d",value.a,value.b);
getch();
}
OUTPUT
            Enter number-A-:4
            First Time Value of A is :4
            Enter Number-B-:Now Value of A is :7
            And Value of B is :7

No comments:

Post a Comment