Font size
WorksheetsQuiz C++
Total questions: 10
Worksheet time: 6mins
What is the only function all C++ programs must contain?
system()
main()
start()
program()
Which of the following is a correct comment?
** Comment **
/* Comment */
*/ Comments */
{ Comment }
The process of creating a new variable without value
instantiation
assigning
naming
declaration
Which command moves the shown text to the next line?
\t
\r
\n
\s
After running the following code, determine the value of each of the following arithmetic expressions :
x=10, y =7, z=2;
x + 2 * y – z;
82
14
22
12
Evaluate the following expressions to true or false
!((-4.2<3.0) && (10<20))
True
False
Which of the following is NOT a comparison operator in C++ language?
<=
=
==
>=
... point variables store decimal numbers (3.5, -5,123, 4.0, etc).
string
float
integer
character
What is the output of this program?
int main()
{
cout<<"I\t LOVE \n\tPROGRAMMING";
return 0;
}
Identify whether these identifiers are valid or invalid.
No_student[3]
Valid
Invalid
