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
The Apgar Medical group keeps a patient file for each doctor in the office. Each record contains the patient's first and last name, home address, and birth year. The records are sorted in ascending birth year order. Two doctors, Dr. Best and Dr. Cushing, have formed a partnership.a. Design the logic that produces a merged list of patients' names in ascending order by birth year. (flowchart or pseudocode)b. Modify the program so that it does not display patients' names, but only produces a count of the number of patients born each year. (flowchart or pseudocode)
("View all employees" function) If users click "View all employees" ( call program:view_employee.php), your program should(i) Retrieve all employees from TECH3740. EMPLOYEE table and list all employees in HTMLTABLE format(ii) If the salary is NULL, print it in red color.(iii) If Gender='M', print it in blue color. If Gender='F', print it in red color.(iv) Display the average salary of listed employees at the bottom of the employee table.(v) A statement "There are # employee(s) in the database." should be displayed above theemployee table, where # is the number of employees.
Q1: A. Develop an M-file that input the n value in to a function and display the value of R as a R= 1² +2²+3² ............. n term result. B. Write Matlab code to keep asking for a number until you enter a negative number, using While loop Structure. C. Use a switch statement to rewrite the following code segment x = 1; a = 3; if(a == 1) x = x+5; elseif (a== 2) x = x+10; elseif (a == 3) x = x+16; else x = x+34; end disp(x);
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.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education
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