Question 1 of 25
Hints left: 3
Q1
What will be the output of the following C++ code? #include <iostream> using namespace std; int main() { int x = -1; unsigned int y = 2; if(x > y) { cout << "x is greater"; } else { cout << "y is greater"; } }
Q2
Choose the correct option. extern int i; int i;
Q3
Which is used to indicate single precision value?
Q4
What is the value of the bool? bool is_int(789.54)
Q5
0946, 786427373824, 'x' and 0X2f are . . . . . . . . and . . . . . . . . literals respectively.
-
A
-
B
-
C
-
D
Q6
What is the result of the expression: 5.0 + 3 in C++?
Q7
What does the 'volatile' keyword indicate in C++?
Q8
What will be the output of the following C++ function? int main() { register int i = 1; int *ptr = &i; cout << *ptr; return 0; }
Q9
What is the output of the following code: cout << (7 >= 7); in C++?
Q10
How many characters are specified in the ASCII scheme?
Q11
In which type do the enumerators are stored by the compiler?
Q12
What is the correct way to declare a pointer to a character in C++?
Q13
What is the output of the following code: cout << (true && true); in C++?
Q14
What is the size of wchar_t in C++?
Q15
The value 132.54 can be represented using which data type?
Q16
What is the data type of the expression: sizeof('A') in C++?
Q17
What will be the output of the following C++ code? #include <iostream> using namespace std; int main() { float i = 123.0f; cout << i << endl; return 0; }
Q18
What will be the output of the following C++ code? #include <iostream> using namespace std; int main() { char c = 74; cout << c; return 0; }
Q19
Evaluate the following. (false && true) || false || true
Q20
What happens when a null pointer is converted into bool?
Q21
Pick the odd one out.
Q22
The size_t integer type in C++ is?
Q23
Which type is best suited to represent the logical values?
Q24
What will be the output of the following C++ code? #include <iostream> using namespace std; int main() { int a = 10; if (a < 10) { for (i = 0; i < 10; i++) cout << i; } else { cout << i; } return 0; }
Q25
What is the range of values for an 'unsigned long int' data type in C++?