When is std::bad_alloc exception thrown?
Statement scanf(“%d”,80);
Identify the user-defined types from the following?
Identify the correct sentence regarding inequality between reference and pointer.
In C++, what is the sign of character data type by default?
Which of the two operators ++ and — work for the bool datatype in C++?
Which of these expressions will make the rightmost set bit zero in an input integer x?
Which of the following gives the memory address of the first element in array?
For what values of the expression is an if-statement block not executed?
What is the output of this program? 1.#include
2.using namespace std;
3.void swap(int &a, int &b);
4.int main()
5.{
6.int a = 5, b = 10;
7.swap(a, b);
8.cout << "In main " << a << b;
9.return 0;
10.}
11.void swap(int &a, int &b)
12.{
13.int temp;
14.temp = a;
15.a = b;
16.b = temp;
17.cout << "In swap " << a << b;
18.}
Which of the following below is /are a valid iterator type?
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 output of this program? 1.#include
2.int main()
3.{
4.char a = '\012';
5. printf("%d", a);
6.return 0;
7.}
How do we declare an abstract class?
The operator used for dereferencing or indirection is ____
What will be the output of the this program? 1.#include
2.using namespace std;
3.int main ()
4.{
5.int array[] = {0, 2, 4, 6, 7, 5, 3};
6.int n, result = 0;
7.for (n = 0; n < 8; n++) {
8.result += array[n];
9.}
10.cout << result;
11.return 0;
12.}
Which of the following correctly describes the meaning of ‘namespace’ feature in C++?
What does the following statement mean? void a;
Which datatype is used to represent the absence of parameters?
What is the output of this program?
1.#include
2.using namespace std;
3.int main()
4.{
5.int *p;
6.void *vp;
7.if (vp == p);
8.cout << "equal";
9.return 0;
10.}
What’s wrong? for (int k = 2, k <=12, k++)
In which type does the enumerators are stored by the compiler?
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’s wrong? while( (i < 10) && (i > 24))
A void pointer cannot point to which of these?
Which value we cannot assign to reference?
Which of the following correctly describes the meaning of‘namespace’ feature in C++?
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.}
Which datatype is used to represent the absence of parameters?
Which of the following belongs to the set of character types?
Which of the following statements are false?
What is the difference between overloaded functions and overridden functions?
The size of an object or a type can be determined using which operator?
The correct statement for a function that takes pointer to a float, a pointer to a pointer to a char and returns a pointer to a pointer to a integer is
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.}
When a language has the capability to produce new data type mean, it can be called as