Question: Complete the memory contents (Address and Data for the variables shown, decimal or hex values) in the figure below, at the end of execution of
Complete the memory contents (Address and Data for the variables shown, decimal or hex values) in the figure below, at the end of execution of the code given below. You will have to execute the code below to get the addresses and data. You may use printf to print contents of variables.using c program pls.
#include
void setPixel();
int redColor = 67;
int main() {
int*pixelColorUp = NULL, *pixelColorDown = NULL;
int blueColor = 231;
int greenColor = 34;
pixelColorUp =&blueColor;
pixelColorDown = &redColor;
*pixelColorUp = *pixelColorDown;
set Pixel();
}
int yellowColor = 89;
void setPixel() {
int *ptrTemp = &yellowColor;
redColor = *ptrTemp;
}
| Variable | Address | Data |
| redColor | ||
| pixelColorUp | ||
| pixelColorDown | ||
| blueColor | ||
| greenColor | ||
| yellowColor |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
