posted by Anonymous .
Cyborg data type sizes. You have been given a job as a programmer on a Cyborg supercomputer. In order to accomplish some calculations, you need to know how many bytes the following data types use: char, int, float, and double. You do not have any manuals, so you can’t look this information up. Write a C++ program that will determine the amount of memory used by these types and display the information on the screen.
// Programming Challenges of Chapter 2 on P77
// Written by Lanchuan Chang
using namespace std;
// 9. Cyborg Data Type Sizes
cout << " the size of a char is " << sizeof(char) << " bytes.\n";
cout << " the size of an int is " << sizeof(int) << " bytes.\n";
cout << " the size of a float is " << sizeof(float) << " bytes.\n";
cout << " the size of a double is " << sizeof(double) << " bytes.\n";