Question: Write a program to determine the address of memory locations allocated to various variables as follows: a. Declare two short int variables, two int variables,
Write a program to determine the address of memory locations allocated to various variables as follows: a. Declare two short int variables, two int variables, and long int variable and then output the address of each variable. b. Draw a memory map that shows the starting address of each variable. c. Calculate the size of the memory location allocated to each type by subtracting the address of the first variable from the address of the second variable of the same type. d. Add statements to your program that use the sizeof operator to find the size of the memory location allocated to each type.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
