Skip to the task
Layout
Back to classic view

You are looking at lesson 10. Your place is still Practice test 1, task 1: About.

CHECKTask 12 of 17 · step 6: Drills: check yourself

The function gets a copy

What does it print, and how do you fix it so a changes?

void move(Point t) {
    t.x += 100;
}

Point a = {1, 2};
move(a);
printf("%d\n", a.x);
Stuck?

1. The fix: void move(Point *t) { t->x += 100; } and move(&a).