[ create a new paste ] login | about

Link: http://codepad.org/2tLRhvjy    [ raw code | output | fork ]

C++, pasted on Feb 17:
1
2
3
4
5
6
7
8
9
10
11
#include <iostream.h>
using namespace std;
union data { long w; float x; char c; };
int main()
{
        data a;
        a.x=3.1416;
        a.w=123456;
        a.c='x';
    cout << a.w;
}


Output:
1
123512


Create a new paste based on this one


Comments: