Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1 Recall the following functions and operators: sizeof function: returns the size of a variable (ie, the number of bytes used by a variable). Note

image text in transcribed
image text in transcribed
1 Recall the following functions and operators: sizeof function: returns the size of a variable (ie, the number of bytes used by a variable). Note when you cout a pointer variable or value, it will be shown in hexadecimal, as indicated by the OX prefix of the number. You can cast the pointer to long if you want the address to be displayed in decimal. Write a C++ program that declares three variables and three pointers that pointing to them (as below) and add cout statements to display out the size, and address of the variables. Run your program and write down your answers in the blank. // the size of a is: int a-10; double da3.1415; // the size of d is: --..-- char c=' A'; // the size of c is: . char str[20]-"Seeing is believing!; /1 the size of str is: int numbers [10]-(100, 101, 102;II the size of numbers is:........ int. p NULL; // the size of pis: // the value of p is: doubles q-NULL; // the size of q is: // the value of q is: -. char*tNULL; 17/ the size of t is:. the value of t is: //Use cout statement to find out values of p, q, t p -&a; // the value of p is q=&d; //the value of qis- t&c; // the value of t is cout

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

Big Data, Mining, And Analytics Components Of Strategic Decision Making

Authors: Stephan Kudyba

1st Edition

1466568704, 9781466568709

More Books

Students also viewed these Databases questions