Value of a in a = (b = 5, b + 5); is
A void pointer cannot point to which of these?
What is the output of the following program? 1.#include
2.using namespace std;
3.int main()
4.{
5.int a = 5;
6.float b;
7.cout << sizeof(++a + b);
8.cout << a;
9.return 0;
10.}
How do we declare an abstract class?
If class A is friend of class B and if class B is friend of class C, which of the following is true?
Identify the correct sentence regarding inequality between reference and pointer.
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.}
Which looping process checks the test condition at the end of the loop?
What is the value of the following 8-bit integer after all statements are executed?
int x = 1;
x = x << 7;
x = x >> 7;
Which of the following is illegal?
Which is correct with respect to size of the datatypes?
What does a escape code represent?
Which of these expressions will return true if the input integer v is a power of two?
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.}
The value 132.54 can represented using which data type?
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 is the value of the bool? bool is_int(789.54)
The conditional compilation
What is the output of this program? 1.#include
2.using namespace std;
3.int main()
4.{
5.float f1 = 0.5;
6.double f2 = 0.5;
7.if(f1 == 0.5f)
8.cout << "equal";
9.else
10.cout << "not equal";
11.return 0;
12.}
What is the output of this program? #include
using namespace std;
int main()
{
int arr[] = {4, 5, 6, 7};
int *p = (arr + 1);
cout << *p;
return 0;
}
Which of the following gives the memory address of the first element in array?
Choose the right option. string* x, y;
What is meaning of following declaration? int(*p[5])();
The output of {int a = 5; int b = 10; cout << (a>b?a:b);}
Which of the following is not an advantage of secondary memory
How the constants are declared?
Identify the incorrect statement
Pick the right option Statement 1:A definition is also a declaration.
Statement 2:An identifier can be declared just once.
Which of the following operator cannot be overloaded?
Which of the following language feature is not an access specifier in C++?
Under which of the following circumstances, synchronization takes place?
____ have the return type void?
What constant defined in header returns the number of bits in a char?
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.}
What is the range of the floating point numbers?
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.}
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);
What is the output of this program? 1.#include
2.using namespace std;
3.int main()
4.{
5.float num1 = 1.1;
6.double num2 = 1.1;
7.if(num1 == num2)
8.cout << "stanford";
9.else
10.cout << "harvard";
11.return 0;
12.}