Question 1 of 25
Hints left: 3
Q1
Which of these expressions will make the rightmost set bit zero in an input integer x?
Q2
Which is correct with respect to the size of the data types?
Q4
What will be the output of the following C++ code? #include <iostream> using namespace std; int main ( ) { static double i; i = 20; cout << sizeof(i); return 0; }
Q5
What will be the output of the following C++ code? #include <iostream> using namespace std; int main() { void a = 10, b = 10; int c; c = a + b; cout << c; return 0; }
Q6
Which of these expressions will isolate the rightmost set bit?
Q7
Identify the incorrect statements. int var = 10; int *ptr = &(var + 1); //statement 1 int *ptr2 = &var; //statement 2 &&var = 40; //statement 3
Q8
What will be the output of the following C++ code? #include <iostream> using namespace std; enum cat { temp = 7 }; int main() { int age = 14; age /= temp; cout << "If you were cat, you would be " << age << endl; return 0; }
Q9
Which of the following belongs to the set of character types?
Q10
What is the range of the floating point numbers?
Q11
For what values of the expression is an if-statement block not executed?
Q12
. . . . . . . . have the return type void.
Q13
What will be the output of the following C++ code? #include <iostream> using namespace std; enum colour { green, red, blue, white, yellow, pink }; int main() { cout << green<< red<< blue<< white<< yellow<< pink; return 0; }
Q14
Which of the following statements are false?
Q15
Which variable does equals in size with enum variable?
Q16
Is the size of character literals different in C and C++?
Q17
In C++, what is the sign of character data type by default?
Q18
Choose the incorrect option.
Q19
Which of the two operators ++ and - work for the bool data type in C++?
Q20
Which of the following is not one of the sizes of the floating point types?
Q21
Which of the following is a valid floating-point literal?
Q22
Can two functions declare variables(non static) with the same name?
Q23
What will be the output of the following C++ code? #include <iostream> using namespace std; int main() { int i; enum month { JAN = 1, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC }; for (i = MAR; i <= NOV; i++) cout << i; return 0; }
Q24
Pick the right option. Statement 1: Global values are not initialized by the stream. Statement 2: Local values are implicitly initialised to 0.
Q25
Identify the incorrect option.