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

1. What does the following do: void afunction(int *x) { x=new int; *x=12; } int main() { int v=10; afunction(&v); cout<<v; } a) Outputs 12 b) Outputs 10 c) Outputs the address of v

5 Answers   Quark,


Why did you leave your last job?

2 Answers  


Who was the creator of c++?

0 Answers  


Which software is used to run c++ program?

0 Answers  


Is it possible for the objects to read and write themselves?

0 Answers  






How do you flush std cout?

0 Answers  


What is difference between n and endl in c++?

0 Answers  


What are c++ tokens?

0 Answers  


Why do we use iterators?

0 Answers  


What is an adjust field format flag?

0 Answers  


Write a corrected statement in c++ so that the statement will work properly. if (x = y) x = 2*z;

2 Answers  


What are the general quetions are in DEna bank manager IT/System interviews?

0 Answers   Dena Bank, ICICI,


Categories