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 meant by entry controlled loop? What all C++ loops are exit controlled?

0 Answers   TCS,


What is function overloading in C++?

0 Answers  


Is java a c++?

0 Answers  


What is java and c++?

0 Answers  


I was a c++ code and was asked to find out the bug in that. The bug was that he declared an object locally in a function and tried to return the pointer to that object. Since the object is local to the function, it no more exists after returning from the function. The pointer, therefore, is invalid outside.

0 Answers  






Explain dangling pointer.

0 Answers  


Can notepad ++ run c++?

0 Answers  


What is near, far and huge pointers? How many bytes are occupied by them?

0 Answers  


write a porgram in c++ that reads an integer and print the biggest digit in the number

0 Answers  


How do you compile the source code with your compiler?

0 Answers  


What is a sequence in c++?

0 Answers  


Differences between private, protected and public and give examples.

0 Answers  


Categories