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

What happens when a function throws an exception that was not specified by an exception specification for this function?

1 Answers  


What are the different types of polymorphism?

3 Answers  


What are pointer-to-members in C++? Give their syntax.

0 Answers   HAL,


True or false, if you keep incrementing a variable, it will become negative a) True b) False c) It depends

0 Answers  


why is c++ called oops? Explain

0 Answers  






How a modifier is similar to mutator?

0 Answers  


Is there anything you can do in C++ that you cannot do in C?

1 Answers  


Write syntax to define friend functions in C++.

0 Answers   HAL,


Should I learn c or c++ or c#?

0 Answers  


How do you flush a buffer in c++?

0 Answers  


What is a memory leak c++?

0 Answers  


Can you declare an array without a size in c++?

0 Answers  


Categories