Question: write a C + + program that takes three integers from the user in variables num 1 , num 2 , and num 3 .

write a C++program that takes three integers from the user in variables num1, num2, and num3. Then assigns pointers ptr1 to the address of num1, ptr2 to the ad of num2 and ptr3 to the address of num3. Pass the three pointers to a function called min_max that finds the minimum and maximum of the contents of the variables pointed at by three pointers. The function should return an array of size two containing the maximum and minimum elements.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!