//Assume int is represted with two bytes, and that myarray starts at memory addr
ID: 3637902 • Letter: #
Question
//Assume int is represted with two bytes, and that myarray starts at memory address 1000.int myarray[12]; //Line 1
int *pINTARRAY1, *pINTARRAY2; //Line 2
pINTARRAY1 = myarray+4; //Line 3
pINTARRAY2 = &myarray[10]; //Line 4
*pINTARRAY1 = 0x1013; //Line 5
*pINTARRAY2 = 0x1d2e; //Line 6
What is the L-value and R-value of the variables pINTARRAY1 and pINTARRAY2 after Line 4? (If you do not have enough information to answer the write N/A).
pINTARRAY1 L-VALUE:_____________ , R-VALUE: _______________
pINTARRAY2 L-VALUE:_____________ , R-VALUE:________________
Which myarray indices are written in Lines 5 & 6 and with what values?
first: index:__________ , value: __________
second: index:__________ , value:__________
Explanation / Answer
Afer line 4 pINTARRAY1 L-VALUE: N/A , R-VALUE: 1010 pINTARRAY2 L-VALUE:N/A , R-VALUE: 1022 after line 5 and 6 first: index: 7 , value: N/A second: index: 13 , value: N/A
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.