Which of the following statements are false?
The operator used for dereferencing or indirection is ____
The pointer can point to any variable that is not declared with which of these?
Which one of the following is not a fundamental data type in C++
What will be output of this program? 1.#include
2.using namespace std;
3.int main()
4.{
5.int i = 3;
6.int l = i / -2;
7.int k = i % -2;
8.cout << l << k;
9.return 0;
10.}
Which reference modifier is used to define reference variable?
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.}
What does a reference provide?
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.}
Evaluate the following (false && true) || false || true
0946, 786427373824, ‘x’ and 0X2f are _____, _____, ____ and _____ literals respectively
-
-
-
-
How to declare a wide character in string literal?
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.}
Which of the following is not a valid conditional inclusions in preprocessor directives
Inline functions are invoked at the time of
Identify the correct sentence regarding inequality between reference and pointer.
Which of the following is/are advantages of cellular partitioned structure:
Which of the following functions below can be used Allocate space for array in memory?
Size of C++ objects are expressed in terms of multiples of the size of a ____ and the size of a char is ____.
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’s wrong? (x = 4 && y = 5) ? (a = 5) ; (b = 6);
Which of the following keyword supports dynamic method resolution?
What is the output of the following program? 1.#include
2.using namespace std;
3.int main()
4.{
5.int num1 = 10;
6.float num2 = 20;
7.cout << sizeof(num1 + num2);
8.return 0;
9.}
Observe following program and answer 100 class Example{public: int a,b,c; Example(){a=b=c=1;} //Constructor 1 Example(int a){a = a; b = c = 1;} //Constructor 2 Example(int a,int b){a = a; b = b; c = 1;} //Constructor 3 Example(int a,int b,int c){ a = a; b = b; c = c;} //Constructor 4 } In the above example of constructor overloading, the following statement will call which constructor Example obj = new Example (1,2,3);
In a C language ‘3’ represents
Which of the following is not a valid conditional inclusions in preprocessor directives
What will be the output of this program? 1.#include
2.using namespace std;
3.int main()
4.{
5.int a = 8;
6.cout << "ANDing integer 'a' with 'true' :" << a && true;
7.return 0;
8.}
What happens when a null pointer is converted into bool?
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.}
Which of the following is not true about preprocessor directives
What does the following statement mean? void a;
There is nothing like a virtual constructor of a class.
Which of the following is not an advantage of secondary memory
C++ provides facility to specify that the compiler should match function calls with the correct definition at the run time. This process is called as
Which one of the following is not a valid reserved keyword in C++
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;
}
Can two functions declare variables(non static) with the same name.
Which of the STL containers store the elements contiguously (in adjacent memory locations)?
Which datatype is used to represent the absence of parameters?