Font size
WorksheetsC++ Basics
Total questions: 25
Worksheet time: 15mins
This is a code that has not yet been linked into a complete program.
Source Code
Assembly Code
Object Code
Machine Code
The language that the central processing unit can understand after it has been translated by the compiler.
Source Code
Assembly Code
Object Code
Machine Code
The object code is produced in what program development phase?
Preprocessing
Compilation
Linking
Loading
Executing
In what phase the c++'s executable program is produced?
Preprocessing
Compilation
Linking
Loading
Executing
What happens first when a C++ executable is run?
The preprocessor converts the source code into an object code.
The compiler converts the object code into an executable code.
The linker links the object code with the missing functions needed to produce the executable code.
The loader places the program in the memory
The CPU executes the program
By default, how are instructions executed by the CPU?
One instruction a a time
Several Instructions at a time
All instructions in one time
None of the above
Single line comments are denoted by what symbol?
//
\\
/*
*/
Which of the following are ignored by the C++ compiler and the computer? Check all that applies.
Comments
Blank lines
Spaces
Tab Spaces
Preprocessing directives
A preprocessing directive starts with what symbol?
//
#
(
{
The library defined in the preprocessor directive must be enclosed by what symbols?
{ }
[ ]
< >
( )
Blanks lines, spaces, and tab characters are called?
Keywords
White spaces
Symbols
Escape Sequences
A code that is reserved by C++ for a specific use.
Keyword
White space
Symbol
Escape Sequence
Which symbol starts a block of code?
<
(
{
[
Which symbol is used to determine that a code/keyword is a function?
<
(
{
[
The words enclosed in double quotation marks are known as the following EXCEPT what?
String
Character String
String Literal
Stream
The semicolon (;) is used to?
Start a block of code
Terminate a function
Start a statement
End a statement
Which of the following is the scope resolution operator?
<<
>>
::
\
Which of the following is the escape character operator?
<<
>>
::
\
Which of the following is the stream insertion operator?
<<
>>
::
\
Which of the following is the stream extraction operator?
<<
>>
::
\
A location in the computer's memory where a value can be stored for use by a program. Note: Answer must be in UPPERCASE letters.
(a)
Which of the following is the input stream object?
>>
<<
cin
cout
Which of the following is NOT a VALID identifier?
X1
_X1
x1
_1x
1x
Which of the following are VALID identifiers?
int
include
return
zero
All variables must be declared before they are used.
True
False
