Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a function that receives three integer numbers b , c and d as arguments, sorts them ascendingly and returns through the same three arguments.

Write a function that receives three integer numbers b,c and d as arguments, sorts them ascendingly and returns through the same three arguments. In other words, after returning from the function, b should contain the minimum of three numbers and d should contain the maximum of them.
Pass three variables by reference (using pointers), so that after returning from the sorting function, your caller function has access to the sorted variables. Inside the sorting function you can once call the function for finding the minimum that you wrote last week to find the minimum and then compare the other two to find the second smallest number.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions