Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Define the purpose of the following C/C++ data types. Write a C or C++ program that stores the listed values in the variables. In your

image text in transcribed
Define the purpose of the following C/C++ data types. Write a C or C++ program that stores the listed values in the variables. In your program write a code that enables you to determine the size of each variable (check out the instruction sizeof0). Write a code that enable you to see the address of each variable (check out the operator &).In the table determine the address of the first element and the last element. Show whether all the elements are in the ascending order. What is the difference in the address of consecutive elements in each variable type, explain your answer. If the variable is more than 1 byte expand the program to determine whether your processor is using Big Endian or Little- Endian byte order. Display your elements in binary, hex, and decimal. When you display 1. your element, does the processor change the content of your element in order to display it? (a) Char (declare variables and store in them: 48, 73, 97, 121) (b) Char table (declare a table of elements and store in them: 41, 65, 89, 113) (c) Short (declare variables and store in them: 48, 73, 97, 121, -48, -73,-97,-121, (d) int (declare a table of 4 elements and store in them: 41, 65, 89, 113, -41, -65, -89, -113) (e) float (declare a table of 4 elements and store in them: 0.1,0.25, 0.5, 1.5) (f) double (declare a table of 4 elements and store in them: 0.1, 0.25, 0.5, 1.5) 2

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

Oracle Database 11g SQL

Authors: Jason Price

1st Edition

0071498508, 978-0071498500

More Books

Students also viewed these Databases questions

Question

Describe the functions of banks and the banking system.

Answered: 1 week ago

Question

Presentations Approaches to Conveying Information

Answered: 1 week ago