Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
88 views
in Computer by (102k points)
closed by
A function can return more than one value by
1. Passing parameters by value
2. Using more than one ‘return’ statement in the function
3. Passing parameters by reference
4. Since a function can return only one value, this is not possible
5.

1 Answer

0 votes
by (103k points)
selected by
 
Best answer
Correct Answer - Option 3 : Passing parameters by reference

Explanation:

In C or C++, we cannot return multiple values from a function directly. 

We can return more than one value from a function by using the method called “call by address”, or “call by reference”.

In the invoker function, we will use two variables to store the results, and the function will take pointer-type data. So we have to pass the address of the data.

In pass-by reference (also called pass-by address), a copy of the address of the actual parameter is stored.

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...