Question: program in this new file. In this new file, write code that will do the following: a . ( 1 point ) Declare and assign

program in this new file. In this new file, write code that will do the following:
a.(1 point) Declare and assign values to variables
i. Declare an integer variable called myInt and assign the value 15 to it.
ii. Declare a pointer variable called myPointer using the dereference operator (**) and assign it to the memory location of myInt using the address-of operator (&)
b.(1 point) Print to console
Print the memory address (this should be in hexadecimal, 1.e.,0x1234 format) of myInt (remember the address-of operator!). Then print the value contained in the variable myPointer.
ii. Print the value (this should be an integer) of myInt. Then print the value pointed to by myPointer (Hint: remember the dereference operator!)
c.(1 point) Change values and print to console
i. Reassign the value of mylnt from 15 to 10 using an assignment operator.
ii. Print the memory address (this should be in hexadecimal, i.e.,0x1234 format) of myInt (remember the address-of operator!). Then print the value contained in the variable myPointer.
iii. Print the value (this should be an integer) of myInt. Then print the value pointed to by myPointer (Hint: remember the dereference operator!)
 program in this new file. In this new file, write code

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!