Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a single program to answer each of the following questions. Grading Rubric: Each of the parts above is worth 10 points (60 total). Including

Write a single program to answer each of the following questions. Grading Rubric: Each of the parts above is worth 10 points (60 total). Including comments at the beginning of your program with your name, the class, and the assignment is worth 15 points. Printing out that same information as a header for your program output is worth 15 points. Including appropriate comments in the body of the program describing what you are doing is worth 10 points.

1) In order to accomplish some calculations, you need to know how many bytes the following 8 data types use on your platform: char, short int, int, long int, long long int, float, double, and long double Write a C program that will determine the amount of memory used by these types and display the information on the screen (console) using the sizeof operator. Your output should look similar to the following: The following show data types and their corresponding sizes in bytes: char 1 small int 2 int 4 long int 4 and so on for all of the values. Your output formatting does not have to match the above exactly, but it should be neatly aligned. You must output the data type and the size in bytes for all of the required C++ types.

2) Confirm that \a will cause the computer to beep.

3) Output the text 12345678 (without a ), then confirm that \b\b\b will back the cursor up three spaces by overwriting the 678 with abc. Output should look like 12345abc

4) Output the text 1234, then a horizontal tab character, then the text abc.

5) Output the text 1234, then a vertical tab character, then the text abc.

6) Assign the largest possible integer to an int variable. Output the contents of the variable. Add 1 to it. Output. Subtract 1 from it. Output. Note: to get a screenshot of the open window, press Alt-Fn-PrntScrn, which copies the currently active window to the clipboard where you may paste it into other applications like Word.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Datacasting How To Stream Databases Over The Internet

Authors: Jessica Keyes

1st Edition

007034678X, 978-0070346789

More Books

Students also viewed these Databases questions

Question

2. List the advantages of listening well

Answered: 1 week ago