Given the following function definition: int doit(int &x,
int y, int &z) { x = 3*x; y = y + 5; z = x+y; return z -
4; } int a = 5, b = 7, c = 9, d = 11; d = doit(a,b,c);

Answers were Sorted based on User's Feedback

Given the following function definition: int doit(int &x, int y, int &z) { x = 3*x; y = y ..

a = 15
b = 7
c = 27
d = 23

 Is This Answer Correct ? 8 Yes 0 No

Given the following function definition: int doit(int &x, int y, int &z) { x = 3*x; y = y ..

I think it will be

a = 15
b = 7
c = 27
d = 4

 Is This Answer Correct ? 4 Yes 6 No

More C++ General Interview Questions

What is an opaque pointer?

write the programme that convert a interger to biniry number

find the two largest values among the 6 numbers using control structures : do-while,for,if else,nestedif- else ,while. one or two of them.

Do the names of parameters have to agree in the prototype, definition, and call to the function?

What does it mean to declare a member function as static?

Why do we need function?

State the difference between pre and post increment/decrement operations.

Discussion on error handling of C++ .

List out function which we can call without using object

Explain virtual class?

What is searching? Explain linear and binary search.

Categories
• STL (138)
• OOPS (871)
• C++ General (2333)