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 implicit pointer that is passed as the first argument for nonstatic member functions?
When class B is inherited from class A, what is the order in which the constructers of those classes are called
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;
8.return 0;
.}
Which of the following operators can be overloaded?
Which of the STL containers store the elements contiguously (in adjacent memory locations)?
What defines a general set of operations that will be applied to various types of data?
If class A is friend of class B and if class B is friend of class C, which of the following is true?
The value 132.54 can represented using which data type?
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.}
The operator used for dereferencing or indirection is ____
What is the output of this program? 1.#include
2.using namespace std;
3.enum colour {
4.green, red, blue, white, yellow, pink
5.};
6.int main()
7.{
8.cout << green<< red<< blue<< white<< yellow<< pink;
9.return 0;
10}
The conditional compilation
Choose the right option. string* x, y;
Which of the following is not a valid conditional inclusions in preprocessor directives
Which of the following is a valid destructor of the class name “Country”
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.}
The statement i++; is equivalent to
Which of the following accesses the seventh element stored in array?
Which of the following is not a standard exception built in C++.
The size_t integer type in C++ is?
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’s wrong? (x = 4 && y = 5) ? (a = 5) ; (b = 6);
Which of the following is the most common way of implementing C++?
For what values of the expression is an if-statement block not executed?
There is nothing like a virtual constructor of a class.
Identify the type of the variables. typedef char* CHAR;. CHAR p,q;
What happens when a null pointer is converted into bool?
Which one of the following is not a fundamental data type in C++
What is the output of this program? 1.#include
2.using namespace std;
3.#define PI 3.14159
4.int main ()
5.{
6.float r = 2;
7.float circle;
8.circle = 2 * PI * r;
9.cout << circle;
10.return 0;
11.}
Which of three sizes of floating point types should be used when extended precision is required?
Which of the following keyword supports dynamic method resolution?
Size of C++ objects are expressed in terms of multiples of the size of a ____ and the size of a char is ____.
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.}
What is the output of this program? 1.#include
2.using namespace std;
3.int main()
4.{
5.int i;
6.char *arr[] = {"C", "C++", "Java", "VBA"};
7.char *(*ptr)[4] = &arr;
8.cout << ++(*ptr)[2];
9.return 0;
10.}
Value of ix+j, if i,j are integer type and ix long type would be
Is bool a fundamental datatype in C++?
Which of the following relationship is known as inheritancerelationship?
When does the void pointer can be dereferenced?