// ConsoleApplication1.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "iostream"
using namespace std;
typedef struct deneme
{
	int i;
	char c;
	double d;
}str;
typedef union deneme2
{
		int i;
	char c;
	double d;
}uni;
int _tmain(int argc, _TCHAR* argv[])
{
	cout<<sizeof(str)<<endl;
	cout<<sizeof(uni)<<endl;
	str s1;
	uni s2;
	s1.c='c';
	s1.d=1234.123;
	s1.i=5;
	cout<<s1.c<<"\t"<<s1.d<<"\t"<<s1.i<<endl<<endl;
	s2.c='x';
	cout<<s2.c<<"\t"<<s2.d<<"\t"<<s2.i<<endl<<endl;
	s2.i=15;
	cout<<s2.c<<"\t"<<s2.d<<"\t"<<s2.i<<endl<<endl;
	s2.d=10e+4;
	cout<<s2.c<<"\t"<<s2.d<<"\t"<<s2.i<<endl<<endl;
	system("pause");
	return 0;
}

