The return value of the following code is Class1& test(Class1 obj) Class1 *ptr = new Class1(); _________ return ptr;
What is the output of this program? 1.#include
2.using namespace std;
3.int main()
4.{
5.int const p = 5;
6.cout << ++p;
7.return 0;
8.}
In C++, what is the sign of character data type by default?
What will be the output of this program? 1.#include
2.using namespace std;
3.int main()
4.{
5.int a = 8;
6.cout << "ANDing integer 'a' with 'true' :" << a && true;
7.return 0;
8.}
Which of the following is not a valid conditional inclusions in preprocessor directives
What does the following statement mean? int (*fp)(char*)
How the constants are declared?
Evaluate the following (false && true) || false || true
Can two functions declare variables(non static) with the same name.
Which of the two operators ++ and — work for the bool datatype in C++?
Minimum number of temporary variable needed to swap the contents of 2 variables is:
Which of the following accesses the seventh element stored in array?
Which of the following operator cannot be overloaded?
Which of the following is the most common way of implementing C++?
What is the output of this program? 1.include
2.using namespace std;
3.int g = 100;
4.int main()
5.{
6.int a;
7.{
8.int b;
9.b = 20;
10.a = 35;
11.g = 65;
12.cout << b << a << g;
13.}
14.a = 50;
15.cout << a << g;
16.return 0;
17.}
To which of these enumerators can be assigned?
What is the output of this program? 1.#include
2.using namespace std;
3.int main()
4.{
5.int a = 5, b = 10, c = 15;
6.int arr[3] = {&a, &b, &c};
7.cout << *arr[*arr[1] - 8];
8.return 0;
9.}
Which is correct with respect to size of the datatypes?
What is the output of this program? 1.#include
2.using namespace std;
3.enum test {
4.A = 32, B, C
5.};
6.int main()
7.{
8.cout << A << B<< C;
9.return 0;
10.}
There is nothing like a virtual constructor of a class.
Choose the incorrect option
Is bool a fundamental datatype in C++?
Identify the user-defined types from the following?
Which of the following below can perform conversions between pointers to related classes?
When class B is inherited from class A, what is the order in which the constructers of those classes are called
What will be output of this program? 1.#include
2.using namespace std;
3.int main()
4.{
5.int i = 3;
6.int l = i / -2;
7.int k = i % -2;
8.cout << l << k;
9.return 0;
10.}
What is the output of the following program? 1.#include
2.using namespace std;
3.int main ( )
4.{
5.static double i;
6.i = 20;
7.cout << sizeof(i);
8.return 0;
9.}
What is the value of the bool? 1.bool is_int(789.54)
What is meaning of following declaration? int(*p[5])();
Which of the following is not one of the sizes of the floating point types?
Which reference modifier is used to define reference variable?
What is the output of the following program? 1.#include
2.using namespace std;
3.int main()
4.{
5.int num1 = 10;
6.float num2 = 20;
7.cout << sizeof(num1 + num2);
8.return 0;
9.}
Is bool a fundamental datatype in C++?
What would be the output of the following program (in 32-bit systems)? 1.#include
2.using namespace std;
3.int main()
4.{
5.cout << sizeof(char);
6.cout << sizeof(int);
7.cout << sizeof(float);
8.return 0;
9.}
What is the output of this program?
1.#include
2.using namespace std;
3.int main()
4.{
5.int a = 5, c;
6.void *p = &a;
7.double b = 3.14;
8.p = &b;
9.c = a + b;
10.cout << c << '\n' << p;
11.return 0;
12.}
The output of this program is int a = 10; void main(){ int a = 20; cout << a << ::a;}
What is the output of the following program? 1.#include
2.using namespace std;
3.int main()
4.{
5.int x = -1;
6.unsigned int y = 2;
7.if(x > y) {
8.cout << "x is greater";
9.} else {
10.cout << "y is greater";
11.}
12.}