C++ How to Program (10th Edition)
C++ How to Program (10th Edition)
10th Edition
ISBN: 9780134448237
Author: Paul J. Deitel, Harvey Deitel
Publisher: PEARSON
bartleby

Concept explainers

bartleby

Videos

Textbook Question
Book Icon
Chapter 14, Problem 14.13E

(sizeof Operator) 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 data- size.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 the right column, as in Fig. 14.19. [Note: The sizes of the built-in data types on your computer might differ from those listed here.]

Char                                       1
Unsigned char                      	  1
Short int                                 2
unsigned short int                  	2
int                                        4
unsigned int                            4
long int                                   4
unsigned long int                    	 4
long long int                             8
unsigned long long int             	 8
float                                       4
double                                    8
long double                              10

Fig. 17.19 Sample output for Exercise 14.13

Blurred answer
Students have asked these similar questions
Show the output of the following code:
Using the code and the function above
State which of the following are true and which are false. If false, explain why.a) Function fscanf cannot be used to read data from the standard input.
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Literals in Java Programming; Author: Sudhakar Atchala;https://www.youtube.com/watch?v=PuEU4S4B7JQ;License: Standard YouTube License, CC-BY
Type of literals in Python | Python Tutorial -6; Author: Lovejot Bhardwaj;https://www.youtube.com/watch?v=bwer3E9hj8Q;License: Standard Youtube License