Question 1 of 25
Hints left: 3
Q1
Which of the following permits function overloading on c++?
Q2
Which of the following feature is used in function overloading and function with default argument?
Q3
What will happen when the handler is not found for an exception?
Q4
Which value will it take when both user and default values are given?
Q5
What is the mandatory part to present in function pointers?
Q6
What is the maximum number of arguments or parameters that can be present in one function call?
Q7
What will you use if you are not intended to get a return value?
Q8
What happens to a function defined inside a class without any complex operations (like looping, a large number of lines, etc)?
Q9
What will be the output of the following C++ code? #include <iostream> using namespace std; namespace first { int var = 5; } namespace second { double var = 3.1416; } int main () { int a; a = first::var + second::var; cout << a; return 0; }
Q10
An inline function is expanded during . . . . . . . .
Q11
From which function the execution of a C++ program starts?
Q12
which of the following is used to terminate the function declaration?
Q13
What will be the output of the following C++ code? #include <iostream> using namespace std; int mult (int x, int y) { int result; result = 0; while (y != 0) { result = result + x; y = y - 1; } return(result); } int main () { int x = 5, y = 5; cout << mult(x, y) ; return(0); }
Q14
To which does the function pointer point to?
Q15
What will be the output of the following C++ code? #include <iostream> using namespace std; namespace extra { int i; } void i() { using namespace extra; int i; i = 9; cout << i; } int main() { enum letter { i, j}; class i { letter j; }; ::i(); return 0; }
Q16
What will be the output of the following C++ code? #include <iostream> using namespace std; int func(int m = 10, int n) { int c; c = m + n; return c; } int main() { cout << func(5); return 0; }
Q17
What is the other name of the macro?
Q18
What is the use of Namespace?
Q19
What will be the output of the following C++ code? #include <iostream> using namespace std; void Values(int n1, int n2 = 10) { using namespace std; cout << "1st value: " << n1; cout << "2nd value: " << n2; } int main() { Values(1); Values(3, 4); return 0; }
Q20
What will be the output of the following C++ code? #include <iostream> #include <stdarg.h> using namespace std; int flue(char c,...); int main() { int x, y; x = flue('A', 1, 2, 3); y = flue('1', 1.0,1, '1', 1.0f, 1l); cout << x << y; return 0; } int flue(char c,...) { return c; }
Q21
What will be the output of the following C++ code? #include <iostream> using namespace std; int Add(int X, int Y, int Z) { return X + Y; } double Add(double X, double Y, double Z) { return X + Y; } int main() { cout << Add(5, 6); cout << Add(5.5, 6.6); return 0; }
Q22
Where does the return statement returns the execution of the program?
Q23
How to print the value of the i variable inside namespace B? namespace A{ int var = 10; namespace B{ int i = 15; } }
Q24
How can you access the arguments that are manipulated in the function?
Q25
What is the general syntax for accessing the namespace variable?