#include <iostream>
using namespace std;
union type {
short si;
int i;
float f;
char ch;
bool b;
};
int main()
{
type example;
cout << "Union:\n";
example.si = 123;
cout << " Short int " << example.si << endl;
example.i = 2000145;
cout << " Int " << example.i << endl;
example.f = 3.14;
cout << " Float " << example.f << endl;
example.ch = 'a';
cout << " Char " << example.ch << endl;
example.b = false;
cout << " Bool " << example.b << endl;
return 0;
}
8+1 = 10 - девятеричная
в восьмеричную - разбиваем на 3 знака