Which of the following statements are false?
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.}
Which of the following statements are true? int f(float)
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.}
Which of the following is not a standard exception built in C++.
Which of these expressions will isolate the rightmost set bit?
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 array[] = {10, 20, 30};
6.cout << -2[array];
7.return 0;
8.}
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.}
Each pass through a loop is called a/an
Is bool a fundamental datatype in C++?
What does the following statement mean? void a;
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 datatype is used to represent the absence of parameters?
What happens when a null pointer is converted into bool?
Which of the following belongs to the set of character types?
What does a reference provide?
The default access level assigned to members of a class is ___________.
In C language, a hexadecimal number is represented by writing
How do we declare an ‘interface’ class?
What is the output of this program?
1.#include
2.using namespace std;
3.int func(void *Ptr);
4.int main()
5.{
6.char *Str = "abcdefghij";
7.func(Str);
8.return 0;
9.}
10.int func(void *Ptr)
11.{
12.cout << Ptr;
13.return 0;
14.}
Select the right option: Given the variables p, q are of char type and r, s, t are of int type (1) t = (r * s) / (r + s); (2) t = (p * q) / (r + s);
The difference between x and ‘x’ is
How to declare a wide character in string literal?
What is the output of this program? 1.#include
2.using namespace std;
3.int main()
4.{
5.char *ptr;
6.char Str[] = "abcdefg";
7.ptr = Str;
8.ptr += 5;
9.cout << ptr;
10.return 0;
11.}
What is the output of this program? 1.#include
2.using namespace std;
3.int main()
4.{
5.int arr[] = {4, 5, 6, 7};
6.int *p = (arr + 1);
7.cout << *arr + 9;
8.return 0;
9.}
What is the index number of the last element of an array with 9 elements?
What happens when a null pointer is converted into bool?
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.}
Which of the following accesses the seventh element stored in array?
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.}
What will happen when the structure is declared?
Which of the following statements are true for: int f(float)
Select the right option.
Given the variables p, q are of char type and r, s, t are of int type. 1.t = (r * s) / (r + s);
2. t = (p * q) / (r + s);
Which of the following is the most preferred way of throwing and handling exceptions?
Identify the user-defined types from the following?
Pick the right option Statement 1:A definition is also a declaration.
Statement 2:An identifier can be declared just once.
What does the following statement mean? int (*fp)(char*)
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.}