If class A is friend of class B and if class B is friend of class C, which of the following is true?
The output of {int a = 5; int b = 10; cout << (a>b?a:b);}
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.}
Which of the STL containers store the elements contiguously (in adjacent memory locations)?
Which of the following is a valid destructor of the class name “Country”
How the constants are declared?
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 datatype is used to represent the absence of parameters?
Which of these expressions will isolate the rightmost set bit?
Value of a in a = (b = 5, b + 5); is
The constants are also called as
Void pointer can point to which type of objects?
The default access level assigned to members of a class is ___________.
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.}
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.}
Identify the incorrect statement
What does a reference provide?
Choose the correct option. extern int i;
int i;
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.enum cat {
4.temp = 7
5.};
6.int main()
7.{
8.int age = 14;
9.age /= temp;
10.cout << "If you were cat, you would be " << age << endl;
11.return 0;
12.}
What is the output of this program? 1.#include
2.using namespace std;
3.int main()
4.{
5.char arr[20];
6.int i;
7.for(i = 0; i < 10; i++)
8.*(arr + i) = 65 + i;
9.*(arr + i) = '\0';
10.cout << arr;
11.return(0);
12.}
Which of the following is a valid floating point literal?
The statement i++; is equivalent to
What happens when a pointer is deleted twice?
The operator used for dereferencing or indirection is ____
Which is correct with respect to size of the datatypes?
Statement scanf(“%d”,80);
Evaluate the following. (false && true) || false || true
In which type does the enumerators are stored by the compiler?
When does the void pointer can be dereferenced?
What is the size of wchar_t in C++?
The size of an object or a type can be determined using which operator?
What does a escape code represent?
What will be the output of this program? 1.#include
2.using namespace std;
3.int array1[] = {1200, 200, 2300, 1230, 1543};
4.int array2[] = {12, 14, 16, 18, 20};
5.int temp, result = 0;
6.int main()
7.{
8.for (temp = 0; temp < 5; temp++) {
9.result += array1[temp];
10.}
11.for (temp = 0; temp < 4; temp++) {
12.result += array2[temp];
13.}
14.cout << result;
15.return 0;
16.}
To which of these enumerators can be assigned?
Which of these expressions will make the rightmost set bit zero in an input integer x?
The conditional compilation
Inline functions are invoked at the time of
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
Which of the following is not a file operation: