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 is the default width for ouputting a long integer using the insertion operator?

0 Answers  


What are the basics of classifying different storage types, why?

2 Answers   Astergate, Symphony,


A milk carton can hold 3.78 litres of milk. Each morning, a dairy farm ships cartons of milk to a local grocery store. The cost of producing one litre of milk is $0.38, and the profit of each carton of milk is $0.27. Write a C++ program that prompts the user to enter the total amount of milk produced in the morning. Then display the number of milk cartons needed to hold milk, the cost of producing milk, and the profit for producing milk.

2 Answers  


Evaluate the following expression as C++ would do :8 * 9 + 2 * 5 a) 82 b) 79 c) 370 d) list

0 Answers  


when can we use copy constructor?

6 Answers   HP,


What are the implicit member functions of class?

0 Answers  


When is the destructor called?

0 Answers  


Define a nested class.

0 Answers  


#include<iostream.h> void main() { class x { public: int func(int) { cout<<"cool"; return 1; } } }

1 Answers   Infosys,


Const char *p , char const *p What is the difference between the above two?

0 Answers   TCS,


Does improper inheritance have a potential to wreck a project?

0 Answers  


Why #include is used?

0 Answers  


Categories