Question 1 of 25
Hints left: 3
Q1
What function is used to return the length of a string in C++?
Q2
In C++, what operator is used to allocate dynamic memory?
Q3
What is the output of the following code: cout << (5 > 2) ? "True" : "False";
Q4
Which of the following is used to access the first element of an array in C++?
Q5
What is the extension of a C++ source file?
Q6
What is the correct way to include a C++ standard library header file named 'vector' in a C++ program?
Q7
Which of the following is not a fundamental data type in C++?
Q8
Which keyword is used to define a constant in C++?
Q9
What is the output of the following code: cout << (5 == 5.0); in C++?
Q10
What does the 'static' keyword mean when used with a global variable in C++?
Q11
What is the output of the following code: int x = 5, y = 2; cout << x / y;
Q12
What is the purpose of the 'break' statement in a switch-case construct in C++?
Q13
What is the syntax for a single-line comment in C++?
Q14
Which of the following is not a valid C++ identifier?
Q15
What is the output of the following code: int x = 10; cout << "Value of x is: " << x++ << endl;?
Q16
What keyword is used to define a class in C++?
Q17
What does the 'cin' object in C++ represent?
Q18
What does the 'endl' manipulator do in C++?
Q19
Which C++ feature allows a function to call itself?
Q20
Which header file is needed to use the 'cin' and 'cout' objects in C++?
Q21
What is the correct way to declare a pointer in C++?
Q22
What is the result of the expression: sizeof(int) in C++?
Q23
What is the correct syntax to dynamically allocate memory for an array of integers in C++?
Q24
What is the keyword used for inheritance in C++?
Q25
What function is used to output data to the console in C++?