What is the output of this program?
1.#include
2.using namespace std;
3.int main()
4.{
5.int n = 5;
6.void *p = &n;
7.int *pi = static_cast(p);
8.cout << *pi << endl;
9.return 0;
10.}
Identify the incorrect option.
Which is correct with respect to size of the datatypes?
Which of the following is true about const member functions?
How the constants are declared?
What does the following statement mean? int (*fp)(char*)
Which classes allow primitive types to be accessed as objects?
In C++, what is the sign of character data type by default?
What’s wrong? (x = 4 && y = 5) ? (a = 5) ; (b = 6);
Can two functions declare variables(non static) with the same name.
Which of the following is not a valid conditional inclusions in preprocessor directives
What is the output of this program? 1.#include
2.using namespace std;
3.int main()
4.{
5.enum channel {star, sony, zee};
6.enum symbol {hash, star};
7.int i = 0;
8.for (i = star; i <= zee; i++) {
9.printf("%d ", i);
10.}
11.return 0;
12.}
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.}
Implementation dependent aspects about an implementation can be found in ____
In a group of nested loops, which loop is executed the most number of times?
Which of the two operators ++ and — work for the bool datatype in C++?
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[ ] = {&a, &b, &c};
7.cout << arr[1];
8.return 0;
9.}
What is the output of this program? 1.#include
2.using namespace std;
3.int main()
4.{
5.int a = 10;
6.if (a < 10) {
7.for (i = 0; i < 10; i++)
8.cout << i;
9.}
10.else {
11.cout << i;
12.}
13.return 0;
14.}
Which of the following below is /are a valid iterator type?
The declaration of structure is also called as?
If the class name is X, what is the type of its “this” pointer (in a nonstatic, non-const member function)?
How do we declare an abstract class?
What will happen when the structure is declared?
Class derived: public base1, public base2 { } is an example of
What will be output of this function? 1.int main()
2.{
3.register int i = 1;
4.int *ptr = &i;
5.cout << *ptr;
6.return 0;
7.}
What is the output of this program? 1.#include
2.using namespace std;
3.int main()
4.{
5.int i;
6.char c;
7.void *data;
8.i = 2;
9.c = 'd';
10.data = &i;
11.cout << "the data points to the integer value" << data;
12.data = &c;
13.cout << "the data now points to the character" << data;
14.return 0;
15.}
Which of the following language feature is not an access specifier in C++?
What will be used when terminating a structure?
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.}
Which of these expressions will isolate the rightmost set bit?
Identify the incorrect option.
Which of the following languages is a subset of C++ language?
Which of the following members do get inherited but become private members in child class
The value 132.54 can represented using which data type?
Which of the following is the most general exception handler that catches exception of any type?
The operator used for dereferencing or indirection is ____
Which of the following is not one of the sizes of the floating point types?
What is the output of this program? 1.#include
2.using namespace std;
3.int main()
4.{
5.float f1 = 0.5;
6.double f2 = 0.5;
7.if(f1 == 0.5f)
8.cout << "equal";
9.else
10.cout << "not equal";
11.return 0;
12.}
Is bool a fundamental datatype in C++?