What is the output of this program? 1.#include
2.using namespace std;
3.int main()
4.{
5.int array[] = {10, 20, 30};
6.cout << -2[array];
7.return 0;
8.}
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.}
Which of the following belongs to the set of character types?
How to declare a wide character in string literal?
Which of the following is not a file operation:
Which of the following is not an advantage of secondary memory
What is the output of this program? 1.#include
2.using namespace std;
3.void addprint()
4.{
5.static int s = 1;
6.s++;
7.cout << s;
8.}
9.int main()
10.{
11.addprint();
12.addprint();
13.addprint();
14.return 0;
15}
Which one of the following is not a valid reserved keyword in C++
It is guaranteed that a ____ has atleast 8bits and a ____ has atleast 16 bits.
Which of these expressions will make the rightmost set bit zero in an input integer x?
0946, 786427373824, ‘x’ and 0X2f are _____, _____, ____ and _____ literals respectively
-
-
-
-
The size of an object or a type can be determined using which operator?
Which of the following is the most general exception handler that catches exception of ‘any type’?
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;
}
What is the output of this program?
1.#include
2.using namespace std;
3.int func(void *Ptr);
4.int main()
5.{
6.char *Str = "abcdefghij";
7.func(Str);
8.return 0;
9.}
10.int func(void *Ptr)
11.{
12.cout << Ptr;
13.return 0;
14.}
What is the output of this program? 1.#include
2.using namespace std;
3.enum test {
4.A = 32, B, C
5.};
6.int main()
7.{
8.cout << A << B<< C;
9.return 0;
10.}
Which of these expressions will isolate the rightmost set bit?
Which of the following is not recommended in a header file?
Which of the following is a valid floating point literal?
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.}
Which of the following is not a valid conditional inclusions in preprocessor directives
For what values of the expression is an if-statement block not executed?
Which of the following is not one of the sizes of the floating point types?
Minimum number of temporary variable needed to swap the contents of 2 variables is:
To which of these enumerators can be assigned?
What’s wrong? (x = 4 && y = 5) ? (a = 5) ; (b = 6);
Which type is best suited to represent the logical values?
If the class name is X, what is the type of its “this” pointer (in a nonstatic, non-const member function)?
What is meaning of following declaration? int(*p[5])();
Which of the following statements are true for: int f(float)
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.}
For what values of the expression is an if-statement block not executed?
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.}
In C++, what is the sign of character data type by default?
Which of the following gives the memory address of the first element in array?
*ptr++ is equivalenet to: