[Solved] Confusion regarding Handling of Different Pointers by Compiler

Maybe a concrete example would help. Try this: #include <stdio.h> const double step_size = 5.0; // degrees of arc struct Location { double latitude; double longitude; }; void go_north(struct Location *const loc) { loc->latitude += step_size; } int main() { struct Location there; there.latitude = 41.0; there.longitude = -101.5; go_north(&there); printf(“Lat. %6.1f, long. %6.1f.\n”, there.latitude, … Read more