Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- using namespace std;
- int main()
- {
- union a
- {
- unsigned int b;
- unsigned char c[0];
- };
- a m = {0x123456};
- cout<<setiosflags(ios::showbase);
- for(int i = 0; i < 1000; i++)
- cout<<hex<<i<<" : "<<int(m.c[i])<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement