/* PROBLEM 2 * add one line of C code to the \"doit2\"function * so that problem
ID: 3609265 • Letter: #
Question
/* PROBLEM 2* add one line of C code to the "doit2"function * so that problem2 prints 0 for x * do not make any changes to the problem2function */ void doit2(void) { intoverflowme[16]; // one line of code here } void problem2(void){ int x = 42;
doit2(); //call do it above
printf("x is %d ", x);
printf("the address of x is 0x%x ",&x);
} looking for an explanation notan answer if possible thank you /* PROBLEM 2
* add one line of C code to the "doit2"function * so that problem2 prints 0 for x * do not make any changes to the problem2function */ void doit2(void) { intoverflowme[16]; } void problem2(void){ int x = 42;
doit2(); //call do it above
printf("x is %d ", x);
printf("the address of x is 0x%x ",&x);
} looking for an explanation notan answer if possible thank you looking for an explanation notan answer if possible thank you
Explanation / Answer
void doit2(void) { int overflowme[16];
*(overflowme + 25) = 0;
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.