[Solved] How can write “takes 2 integers, returns a Point_t representing these integers” function in C programming?
[ad_1] this is really straightforward: typedef struct { int x; int y; } Point_t; Point_t f(int x, int y) { Point_t p = { x, y }; return p; } And (to beat possible comments upfront): no, this is not returning a reference to a local variable. [ad_2] solved How can write “takes 2 integers, … Read more