Create a main function and do the following sequence of instructions: a. Declare two integer variables r and s. b. Declare two pointer to an integer variables a and b. c. Assign the following values: r = 50, s = 25 d. Let pointer a points to the address of r. e. Print the value and address of r using a. f. Increment the value of r by 15 using a. g. Let pointer b points to the address of s. h. Print the value and address of s using b. i. Add the value r to the value stored in s using their pointer variables. j. Let a points to the address pointed to by b. k. Change the value of s to 50 using a. l. Print the values and address pointed by a and b.
Create a main function and do the following sequence of instructions:
a. Declare two integer variables r and s.
b. Declare two pointer to an integer variables a and b.
c. Assign the following values: r = 50, s = 25
d. Let pointer a points to the address of r.
e. Print the value and address of r using a.
f. Increment the value of r by 15 using a.
g. Let pointer b points to the address of s.
h. Print the value and address of s using b.
i. Add the value r to the value stored in s using their pointer variables.
j. Let a points to the address pointed to by b.
k. Change the value of s to 50 using a.
l. Print the values and address pointed by a and b.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images