Which data type can be stored in a register?
Which constructor will initialize the base class data member?
What is a bitset in C++?
The correct syntax to access the member 'b' of the i-th structure in the array 's' of the structure 'temp' is:
What is the output of the following C++ code?
int main()
{
int arr[] = {20, 40, 60};
cout << -2[arr];
return 0;
}
What is the output of the following C code?
#include<stdio.h>
int main()
{
int a = 50;
int b = 50;
if (!(a ^ b))
printf("a is equal to b");
else
printf("a is not equal to b");
return 0;
}
What is a friend function in C++?
Predict the output of the following C program:
#include <stdio.h>
#define SIZE(arr) (sizeof(arr) / sizeof(*arr))
void fun(int* arr, int n)
{
*arr += *(arr + n - 1) += 10;
}
void printArr(int* arr, int n)
{
for(int i = 0; i < n; ++i)
printf("%d ", arr[i]);
}
int main()
{
int arr[] = {10, 20, 30};
int size = SIZE(arr);
fun(arr, size);
printArr(arr, size);
return 0;
}
Given the following classes, which of the following are the possible row entries in the vtable of the D2 class?
class Base
{
public:
virtual void function1() {};
virtual void function2() {};
};
class D1: public Base
{
public:
virtual void function1() {};
};
class D2: public Base
{
public:
virtual void function2() {};
};