Chapter 17: Problem 13
Write a program that uses the sizeof operator to determine the sizes in bytes of the various data types on your computer system. Write the results to the file datasize. dat, so that you may print the results later. The results should be displayed in two-column format with the type name in the left column and the size of the type in right column, as in: $$\begin{aligned} &\begin{array}{lr} \text { char } & 1 \\ \text { unsigned char } & 1 \\ \text { short int } & 2 \\ \text { unsigned short int } & 2 \\ \text { int } & 4 \\ \text { unsigned int } & 4 \\ \text { long int } & 4 \\ \text { unsigned long int } & 4 \\ \text { float } & 4 \\ \text { double } & 8 \\ \text { long double } & 10 \end{array}\\\ &\text { n } \end{aligned}$$
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.