X1056: Tracking maximization in C++

The function maximize receives two integers and updates them so that they both hold the value of the greater of the two. It also helps track what has changed by returning a pointer to the integer that used to hold the smaller number.

However, if the integers already have the same value, neither should be changed and a nullptr should be returned.

Your Answer:

Feedback

Your feedback will appear here when you check your answer.