Question
#include <iostream>
using namespace std;
void Sum(int a, int b, int & c)
{
a = b + c;
b = a + c;
c = a + b;
}
int main()
{
int x = 2, y =3;
Sum(x, y, y);
cout << x << " " << y;
return 0;
}
a.
2 3
b.
6 9
c.
2 15
d.
compile time error
Posted under Object Oriented Programming Using C++
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. What is the output of this program?
Similar Questions
Discover Related MCQs
Q. Where does the execution of the program starts?
View solution
Q. What are mandatory parts in function declaration?
View solution
Q. which of the following is used to terminate the function declaration?
View solution
Q. How many max number of arguments can present in function in c99 compiler?
View solution
Q. Which is more effective while calling the functions?
View solution
Q. What is the scope of the variable declared in the user definied function?
View solution
Q. How many minimum number of functions are need to be presented in c++?
View solution
Q. How many ways of passing a parameter are there in c++?
View solution
Q. Which is used to keep the call by reference value as intact?
View solution
Q. By default how the value are passed in c++?
View solution
Q. How many types of returning values are present in c++?
View solution
Q. What will you use if you are not intended to get a return value?
View solution
Q. Where does the return statement returns the execution of the program?
View solution
Q. When will we use the function overloading?
View solution
Q. Which of the following permits function overloading on c++?
View solution
Q. In which of the following we cannot overload the function?
View solution
Q. Function overloading is also similar to which of the following?
View solution
Q. Overloaded functions are
View solution
Q. What will happen while using pass by reference
View solution
Q. When our function doesn’t need to return anything means what will we use/send as parameter in function?
View solution
Suggested Topics
Are you eager to expand your knowledge beyond Object Oriented Programming Using C++? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!