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);

Answer Posted / cris

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

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is recursion?

644


Give the difference between the type casting and automatic type conversion. Also tell a suitable C++ code to illustrate both.

620


What do you mean by “this” pointer?

604


What are the effects after calling the delete this operator ?

543


Which programming language is best?

538






What are shallow and deep copy?

585


What are files in c++?

583


Is the declaration of a class its interface or its implementation?

694


What is the main purpose of overloading operators?

582


What are function prototypes?

640


Write a program to encrypt the data in a way that inputs a four digit number and replace each digit by (the sum of that digit plus 7) modulus 10. Then sweep the first digit with the third, second digit with the fourth and print the encrypted number.

2084


How the virtual functions maintain the call up?

598


Is c++ still being used?

553


What is prototype in c++ with example?

551


Does c++ have a hash table?

531