#include #include #include //for CHAR_BIT, UCHAR_MAX, USHRT_MAX using namespace std; int main() { cout << "On my platform, a byte contains " << CHAR_BIT << " bits.\n\n" << "On every platform, a char is by definition 1 byte.\n" << "On my platform, the largest number that an unsigned char" << " can hold is " << UCHAR_MAX << ".\n\n" << "On my platform, an unsigned short contains " << sizeof (unsigned short) << " bytes or " << CHAR_BIT * sizeof (unsigned short) << " bits.\n" << "The largest number that an unsigned short can hold is " << USHRT_MAX << ".\n"; return EXIT_SUCCESS; }