Font size
Worksheets9-Cpp-1
Total questions: 13
Worksheet time: 6mins
Which one indicates a single-line comment?
**
//
##
?
Of the following, which one is a machine language?
Assembly
C++
Pascal
C#
Comments are required in a program to add explanation about your code without compiling.
True
False
What punctuation character signals the end of each statement?
??
**
;
\\
What statement to you use to print something to the screen?
cin
cout
if
return
What will the following statements print?
int i=5;
int j=7;
cout << i << " " << j ;
Of the following, which one is a valid variable name?
return
2020ichc
ichc2_020
ichb 2020
All variables must be declared before they can be used.
True
False
Which one is output operator?(cout)
<<
\\
==
&&
Which of the following is correct in C ++ for main function?
int main()
{
}
int Main()
{
}
int main
{
}
int MAIN()
{
}
Which of the following prompts the user to enter a price?
cin >> "What is the price? ";
cin << "What is the price? ";
cout << "What is the price? ";
cout >> "What is the price? ";
Which of the following statements advances the cursor to the next line on the computer screen?
cout << endl;
cout << endline;
cout << newline;
cout << (\n);
Which is the smallest unit of computer storage?
Byte
Bit
Kilobyte
Megabyte
