Suva Programming
Blog about C++ and other programming source code.
Pages
Home
Privacy Policy
Disclaimer
Thursday 2 July 2020
CPP Program to implement union
Source Code :
#include<iostream>
#include<stdio.h>
using namespace std;
union test
{
int x;
char y[5];
int z;
}t1;
int main()
{
cout<<"Size = "<<sizeof(t1);
return 0;
}
Program Output :
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment