// variables.cpp example. // Illustrate the use of // primitive datatypes. #include int main() { char a = 'A', b = 33, c = -25; cout << a << " " << b << " " << c << endl; cout << (int) a << " " << (int) b << " " << (int) c << endl; unsigned char d = 239; cout << d << " " << (int) d << endl << endl; short int e = 20000, f = -25000; unsigned short int g = 60000; cout << e << " " << f << " " << g << endl; long int h = 2000000000, i = -1500000000; unsigned long int j = 4000000000; cout << h << " " << i << " " << j << endl << endl; float x = (float) 3.141592; double y = 3.14159265358980; cout << x << " " << y << endl; bool s = true, t = false; cout << s << " " << t << endl; return 0; } // Output: A ! t 65 33 -25 n 239 20000 -25000 60000 2000000000 -1500000000 4000000000 3.14159 3.14159 1 0