Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 point Declare and assign values to variables
i Declare an integer variable called myInt and assign the value to it
ii Declare a pointer variable called myPointer using the dereference operator and assign it to the memory location of myInt using the addressof operator &
b point Print to console
Print the memory address this should be in hexadecimal, ex format of myInt remember the addressof 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 point Change values and print to console
i Reassign the value of mylnt from to using an assignment operator.
ii Print the memory address this should be in hexadecimal, iex format of myInt remember the addressof 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!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started