Question: Assume a program defines short variables svall and sval2; and initializes them with 321 and 100, respectively. Write the responses for the following questions: 1.
Assume a program defines short variables svall and sval2; and initializes them with 321 and 100, respectively. Write the responses for the following questions: 1. Declare a pointer variable, sptr pointing to a short integer. 2. Assign the address of variable svall to the pointer variable sptr. 3. Assign the value of sval2 to svall using the pointer variable sptr. 4. Print the address of svall using the pointer variable sptr. 5. If the value at sptr is 16436, then what will be the value given by sptr+2 assuming that short integer takes 2 bytes in memory?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
