// Minimal program #include using namespace std; int main(int argc, char **argv) { short x; // Defines a signed short variable unsigned short y; // Defines an unsigned short variable x = -1; // x = 1111111111111111 (2s compl code for -1) y = x; // y = 1111111111111111 cout << "signed number x: " << x << endl; // Prints -1 cout << "unsigned number y: " << y << endl; // Prints 65535 (2^16 - 1) }