✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Consider the following function:
void incr(char** ptr)
{
++ptr;
}
and the following code excerpt (i.e a part of a code that is elsewhere correct),where you have to add two instructions, one for u and one for v:
char msg[] = "CS-202";
char* tab[] = { msg + 1, msg + 3 };
char* p = msg + sizeof(msg) - 1;
char** u = tab;
char** v = &p;
incr(u);
// add one statement on u
// add one statement on v
for (char* r = *u; r < *v; ++r) putchar(*r);
What should be added (one instruction for u and one instruction for v) so that the above code prints "20"?Penalty for wrong ticks.