C Programming Test
What will happen when we use void in argument passing?
a) It will not return value to its caller
b) It will return value to its caller
c) Maybe or maynot be return any value to its caller
d) None of the mentioned
What is the output of this program?
-
#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
"You need a similar assignment done from scratch? Our qualified writers will help you with a guaranteed AI-free & plagiarism-free A+ quality paper, Confidentiality, Timely delivery & Livechat/phone Support.
Discount Code: CIPD30
Click ORDER NOW..


