a Create a procedural C program called datatypesizescc that
(a) Create a procedural C++ program called datatype_sizes.cc that will output the sizes in bytes of the datatypes long int, float, double and float *. Make your program simple and and its logic straightforward. For example, the program logic can consist solely of four printf() statements. With the exception of warnings about parameters argc and argv of function main() not being used, your program must compile without errors or warnings when the -Wall and -Wextra options are given to the C++ compiler. Hint: use the C/C++ function sizeof(). The return type of sizeof() is size_t. To have printf(3) output a value of type size_t, use the “%zu” or “%zd” format specification. The program example from class on October 13 would be a very good starting point for your program. Note: overly and unnecessarily complex programs may be docked marks.
(b) Compile your C++ program two ways: first with the option “-m32” and then with the option “-m64”. These options specify 32- and 64-bit architecture, respectively. Name the resultant executables 32bit_sizes and 64bit_sizes, respectively. Show a log of your compilations in lab6.txt. Have the C++ compiler perform extra checks for potentially problematic situations by using the -Wall and -Wextra options. You can also use -Wpedantic if you wish.
(c) Run each of your executables in part (b) (include a log of this in lab6.txt), and then write a sentence or two comparing their outputs; that is, comparing the size of datatypes used by the C/C++ compiler when compiling for the two different architectures (32-bit or 64-bit).
Solution
a)

