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 ..

Answer / cris

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 ..

Answer / harminder

I think it will be

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

Is This Answer Correct ?    4 Yes 6 No

Post New Answer

More C++ General Interview Questions

Explain function overloading and operator overloading.

0 Answers  


What is difference between c++ 11 and c++ 14?

0 Answers  


Tell me can a pure virtual function have an implementation?

0 Answers  


What is a conversion constructor?

1 Answers  


Explain deep copy and a shallow copy?

0 Answers  






Can we distribute function templates and class templates in object libraries?

0 Answers  


Explain the difference between realloc() and free() in c++?

0 Answers  


Can a constructor be private?

0 Answers  


How long does it take to get good at leetcode?

0 Answers  


What are references in c++? What is a local reference?

0 Answers  


How should a contructor handle a failure?

0 Answers  


What are the various access specifiers in c++?

0 Answers  


Categories