Infonet Technology
Give wings to your dreams with us
C++ Exam 2025
1 / 31
What will be the output of the following C++ code?
#include <iostream> using namespace std; int main() { char c = 74; cout << c; return 0; }
2 / 31
Which concept allows you to reuse the written code in C++?
3 / 31
Which is more effective while calling the C++ functions?
4 / 31
Which of the following correctly declares an array in C++?
5 / 31
What is the value of p in the following C++ code snippet?
#include <iostream> using namespace std; int main() { int p; bool a = true; bool b = false; int x = 10; int y = 5; p = ((x | y) + (a + b)); cout << p; return 0; }
6 / 31
Which data type would be best to store a person's age?
7 / 31
What is meant by a polymorphism in C++?
8 / 31
Who invented C++?
9 / 31
What is the difference between delete and delete[] in C++?
10 / 31
What is the benefit of c++ input and output over c input and output?
11 / 31
Which of the following is the correct syntax of including a user defined header files in C++?
12 / 31
What is Inheritance in C++?
13 / 31
Which of the following is used for comments in C++?
14 / 31
What happens if the following program is executed in C and C++?
#include <stdio.h> int main(void) { int new = 5; printf("%d", new); }
15 / 31
What is C++?
16 / 31
The C++ code which causes abnormal termination/behaviour of a program should be written under _________ block.
17 / 31
Which of the following is used to terminate the function declaration in C++?
18 / 31
#include<iostream> using namespace std; int main () { int cin; cin >> cin; cout << "cin: " << cin; return 0; }
19 / 31
What will be the output of the following C++ code snippet?
#include <iostream> using namespace std; int operate (int a, int b) { return (a * b); } float operate (float a, float b) { return (a / b); } int main() { int x = 5, y = 2; float n = 5.0, m = 2.0; cout << operate(x, y) <<"\t"; cout << operate (n, m); return 0; }
20 / 31
Which of the following approach is used by C++?
21 / 31
Which of these is not a fundamental data type in C++?
22 / 31
#include <iostream> using namespace std; int main () { int a, b, c; a = 2; b = 7; c = (a > b) ? a : b; cout << c; return 0; }
23 / 31
Which of the following type is provided by C++ but not C?
24 / 31
What distinguishes a class from an object in OOP?
25 / 31
What is the use of the indentation in c++?
26 / 31
Which of the following symbol is used to declare the preprocessor directives in C++?
27 / 31
#include <stdio.h> void func(void) { printf("Hello"); } void main() { func(); func(2); }
28 / 31
Which of the following constructors are provided by the C++ compiler if not defined in a class?
29 / 31
What is a variable in C++?
30 / 31
Which of the following is a correct identifier in C++?
31 / 31
What is abstract class in C++?