CJCoding With Joseph
15free / daySign inCreate account

Define a struct type named Point with integer fields x and y. Write a function named move that takes a pointer to a Point plus two integers dx and dy, and adds dx to the point's x and dy to its y. In main, create a Point at (2, 3), call move to shift it by (4, 5), then print the result exactly as: Point: (6, 8) followed by a newline. This introduces passing a struct by pointer so the function can change the original.

Expected output

Point: (6, 8)

= newline. The output ends with a newline, so print one after the last line.

Hints3 available
Topics
Structs
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (p, fori)

Your output

Run your code to see the output here...

Test cases

Run your code to see test case results.