// 24T3 COMP1511 Week 5 Lecture 2 // variables/data are passed into functions by value // a copy of the value gets passed into the function #include struct point { int x; int y; }; // This function will only modify the local copy of p void update(struct point p){ p.x = p.x + 1; p.y = p.y + 1; } int main(void) { struct point p; p.x = 10; p.y = 9; update(p); printf("(%d,%d)\n", p.x, p.y); return 0; }