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 ..

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 ..

I think it will be

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

 Is This Answer Correct ? 4 Yes 6 No

More C++ General Interview Questions

What are the conditions that have to be met for a condition to be an invariant of the class?

Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.

What are the different operators in C++?

Is C++ case sensitive a) False b) Depends on implementation c) True

what you know about c++?

How can a called function determine the number of arguments that have been passed to it?

1)#include <iostream.h> int main() { int *a, *savea, i; savea = a = (int *) malloc(4 * sizeof(int)); for (i=0; i<4; i++) *a++ = 10 * i; for (i=0; i<4; i++) { printf("%d\n", *savea); savea += sizeof(int); } return 0; } 2)#include <iostream.h> int main() { int *a, *savea, i; savea = a = (int *) malloc(4 * sizeof(int)); for (i=0; i<4; i++) *a++ = 10 * i; for (i=0; i<4; i++) { printf("%d\n", *savea); savea ++; } return 0; } The output of this two programs will be different why?

Explain the concept of copy constructor?

what is scupper?

Which one is better- macro or function?

which of the following is not an secondary constant a) array b) real c) union

What are Binay tress and B trees? Diff between them?

Categories
• STL (105)
• OOPS (592)
• C++ General (1318)