Enter your email address:


C Books Guide and List
C++ Books Guide and List
Best Java Books

can we perform operations like addition using unions?if possible how can we perform

0 votes
asked by anonymous

1 Answer

0 votes
Yes, we can perform operation sing unions. Like this

 

#include<stdio.h>

union uni1

{

           int first_union;

}u1;

union uni2

{

         int second_union;

}u2;

int main()

{

               u1.first_union=6;

               u2.second_union=4;

               printf("%d",u1.first_union+u2..second_union);

}
answered by anonymous

Related questions