Exercises in this lecture  previous -- Keyboard shortcut: 'p'  next -- Keyboard shortcut: 'n'  Go to the slide, where this exercise belongs -- Keyboard shortcut: 'u'  

Exercise 1.2
Functions with struct input and struct output


Change the program from above such that also the new address of a person is passed as a pointer to a structure. I.e, in this version both parameters to move_person should be pointers.

Program yet another version that returns a moved person from the function (via return). The input person should not be changed. In this version of the program, you may choose to use pure call-by-value parameters (just relying on the value semantics of structs).

There is continuation of this exercise later in the material.


There is no solution to this exercise