Question 1 of 25
Hints left: 3
Q1
Which of the following is a valid floating-point literal?
Q2
Which of the following statements are false?
Q3
What is the range of the floating point numbers?
Q5
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; }
Q6
Pick the right option. Statement 1: Global values are not initialized by the stream. Statement 2: Local values are implicitly initialised to 0.
Q7
Which is correct with respect to the size of the data types?
Q8
Which variable does equals in size with enum variable?
Q9
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; }
Q10
In C++, what is the sign of character data type by default?
Q11
Which of the two operators ++ and - work for the bool data type in C++?
Q12
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; }
Q13
Can two functions declare variables(non static) with the same name?
Q14
For what values of the expression is an if-statement block not executed?
Q15
Which of the following is not one of the sizes of the floating point types?
Q16
Which of the following belongs to the set of character types?
Q17
Which of these expressions will isolate the rightmost set bit?
Q18
Choose the incorrect option.
Q19
Which of these expressions will make the rightmost set bit zero in an input integer x?
Q20
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; }
Q21
Is the size of character literals different in C and C++?
Q22
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; }
Q23
. . . . . . . . have the return type void.
Q24
Identify the incorrect option.
Q25
Identify the incorrect statements. int var = 10; int *ptr = &(var + 1); //statement 1 int *ptr2 = &var; //statement 2 &&var = 40; //statement 3