#include #include #include void pbin(int n) { unsigned int mask = 1<<(8*sizeof(int)-1); while (mask != 0) { if (n & mask) cout << "1"; else cout << "0"; mask >>= 1; } cout << "\n"; } void main() { pbin(10); pbin(64); pbin(0); pbin(-3); int a=2053; int b=65537; float c=1.25; int d=13; char e[12]; int f=-5; strcpy(e, "ABCDEFGHIJK"); cout << "a is at " << (unsigned int)&a << "\n"; cout << "b is at " << (unsigned int)&b << "\n"; cout << "c is at " << (unsigned int)&c << "\n"; cout << "d is at " << (unsigned int)&d << "\n"; cout << "e is at " << (unsigned int)e << "\n"; cout << "f is at " << (unsigned int)&f << "\n"; }