-1

Using strictly pointer data type, write a modular C++ program that makes use of a single function called convert() to sort two integer numbers passed to it as arguments, exchanging them if the first is smaller than the second (Descending order). Example: if the function is called in main() as convert (11, 20), it should return the numbers sorted as 20, 11.

2
Contributors
1
Reply
11
Views
3 Years
Discussion Span
Last Post by mobashir20
0

u can't return 2 value to main(),
from a function we can return only single value, to return multiple value we have to use Vector().

Edited by mobashir20: something was missing

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.