Use the C programming language to write code that proclaims and sets a double, int, and char. Afterward, proclaim and set a pointer to the double, int, and char. The code must print the inscription of, and value stored in, and the memory size (in bytes) of all six variables. The "0x%x" formatting specifier outputs inscriptions in hexadecimal.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter12: Points, Classes, Virtual Functions And Abstract Classes
Section: Chapter Questions
Problem 1TF
icon
Related questions
Question

Use the C programming language to write code that proclaims and sets a double, int, and char. Afterward, proclaim and set a pointer to the double, int, and char. The code must print the inscription of, and value stored in, and the memory size (in bytes) of all six variables. The "0x%x" formatting specifier outputs inscriptions in hexadecimal.

SAMPLE OUTPUT:

Char ___ 's inscription is 0x___
Int ___'s inscription is 0x___
Double ___'s inscription is 0x___
Char* ___'s inscription is 0x___
Int* ___'s inscription is 0x___
Double* ___'s inscription is 0x___

Char ___ 's value is ___
Int ___'s value is ___
Double ___'s value is ___
Char* ___'s value is 0x___
Int* ___'s value is 0x___
Double* ___'s value is 0x___

Char ___ 's size is ___ bytes
Int ___'s size is ___ bytes
Double ___'s size is ___ bytes
Char* ___'s size is ___ bytes
Int* ___'s size is ___ bytes
Double* ___'s size is ___ bytes

Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Datatypes
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
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr