Use the following lines of code to answer the next several questions. Assume the
ID: 3831966 • Letter: U
Question
Use the following lines of code to answer the next several questions. Assume the array b[] is loaded into memory at address location 2000 and an integer on this system has a size of 2, a float a size of 4 and a double a size of 8. You may use an answer more than once. int b[] = {1, 3, 9, 7}; int *bPtr = b; a. What is the ADDRESS of the value at location b[2] A) 2010 B) 2004 b. What is the VALUE at location *bPtr? C) 2008 D) 2002 If I do this ++bPtr; for questions 21 and 22 (just one time!), E) 2006 F) 2000 c. What is the VALUE at location *bPtr? G) 3 H) 9 d. What will printf("%p", bPtr) display? I) 1 J) 7 K) none of the above Use the code below to answer the next questions in this partial program a) #includeExplanation / Answer
a)
b base adress is 2000
as it is of int type every next element of array is found at 2000+2*x
b[x]=2000+2*x;
b[2]=2000+4=2004;
so option b is coorect
b) as b contain base adress *bptr is equal to 2000;
c)
value is 3 for *bptr
d)2002
next question
since it passes 4 argument as a command line argument
2) argc=4;
3) /a.out
4) i or b line create double pointer
5) r means read only
6)w means write
7)FILE *inFilePtr
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.