#include // printf #include // EXIT_SUCCESS // Point is a (struct point_st) typedef struct point_st { int x, y; } Point; void DoubleXBroken(Point p) { p.x *= 2; } void DoubleXWorks(Point* p) { p->x *= 2; } int main(int argc, char** argv) { Point a = {1, 1}; DoubleXBroken(a); printf("(%d,%d)\n", a.x, a.y); DoubleXWorks(&a); printf("(%d,%d)\n", a.x, a.y); return EXIT_SUCCESS; }