Skip to the task
Layout
Back to classic view

You are looking at lesson 8. Your place is still lesson 5, task 1: Functions.

CHECKTask 20 of 25 · step 8: Drills: check yourself

A pointer into an array

What does this code print?

int t[] = {1, 2, 3, 4};
int *q = t + 1;
printf("%d %d\n", *q, q[2]);
Stuck?

2 4: q points to t[1], and q[2] to t[3].