Question 1 of 25
Hints left: 3
Q1
What will be the value of 'x' after executing the following code: int x = 5; x += 3; in C++?
Q2
What is this operator called ?:?
Q3
What will be the output of the following C++ code? #include <iostream> using namespace std; main() { double a = 21.09399; float b = 10.20; int c ,d; c = (int) a; d = (int) b; cout << c <<' '<< d; return 0; }
Q4
What will be the output of the following C++ code? #include <iostream> using namespace std; int main() { int i, j; j = 10; i = (j++, j + 100, 999 + j); cout << i; return 0; }
Q5
What is the result of the expression: 3 * (4 + 2) in C++?
Q6
What is the purpose of the ternary operator (?:) in C++?
Q7
What is the result of the expression: 10 % 3 in C++?
Q8
What will be the output of the following C++ code? #include <iostream> using namespace std; int main () { int x, y; x = 5; y = ++x * ++x; cout << x << y; x = 5; y = x++ * ++x; cout << x << y; return 0; }
Q9
What is the syntax for the 'if' statement in C++?
Q10
What is the purpose of the modulo operator (%) in C++?
Q11
Which operator is having the right to left associativity in the following?
Q12
What will be the output of the following C++ code? #include <iostream> using namespace std; int main() { int a; a = 5 + 3 * 5; cout << a; return 0; }
Q13
What is the use of dynamic_cast operator?
Q14
What is the purpose of the 'else' statement in C++?
Q15
What does the 'sizeof' operator return in C++?
Q16
What will be the output of the following code: cout << (4 > 3 ? "Yes" : "No"); in C++?
Q17
What is the correct syntax for the 'switch' statement in C++?
Q18
What will be the output of the following code: cout << (5 == 5.0); in C++?
Q19
What does the '++' operator do when used as a postfix operator?
Q20
Which operator is having the highest precedence?
Q21
What is the output of the following code: cout << (5 != 5); in C++?
Q22
What will be the output of the following C++ code? #include <iostream> using namespace std; int main() { int a = 5, b = 6, c, d; c = a, b; d = (a, b); cout << c << ' ' << d; return 0; }
Q23
What is the result of the expression: 5 + 3 * 2 in C++?
Q24
Which operator is used to access the memory address of a variable in C++?
Q25
What will be the output of the following C++ code? #include <iostream> using namespace std; int main() { int a = 5, b = 6, c; c = (a > b) ? a : b; cout << c; return 0; }