Font size
WorksheetsCPP MX
Total questions: 86
Worksheet time: 45mins
C++ is an ____________________ that is an
extension of the procedural C programming language
subjective programming language
objective programming language
object-oriented programming language
subject-oriented programming language
_________________ are used to make functions within the
standard C++ libraries available to a program
Processor directives
Preprocessor directives
Administrator
directives
Program directives
Each C++ program must contain only __________ as the
entry point to the program
one method
a method
two method
one main method
It define the actions that the program will execute
Expressions
Equations
Questions
Statements
A ______________ specifies a data type and a chosen name
by which the value within that variable can be referenced
variable declaration
variable specification
variable
code
fixed declaration
The cout function, which is part of the C++ _____ library,
writes content to the standard output console
istream
iostream
stream
conio
An array is a fixed size variable that stores multiple items of
data in elements, which are numbered starting at ____
two
one
zero
-1
A vector variable stores multiple items of data in elements and
can be dynamically resized
TRUE
FALSE
A vector variable stores multiple items of data in elements and
cannot be dynamically resized
TRUE
FALSE
The value stored in an array or vector element can be
referenced using that variable’s name and its index number
TRUE
FALSE
The value stored in an array or vector element can be
referenced using that variable’s name and its index finger
TRUE
FALSE
Variable values that are never changed by the program should
be stored in a constant
TRUE
FALSE
Variable values that are changed by the program should
be stored in a constant
TRUE
FALSE
A constant list can be automatically numbered by the enum
keyword and given a type name by the typedef keyword
TRUE
FALSE
A variable list can be automatically numbered by the enum
keyword and given a type name by the typedef keyword
TRUE
FALSE
C++ was developed by Dr. Bjarne Stroustrup between 1983-1985
TRUE
FALSE
C was developed by Dr. Bjarne Stroustrup between 1983-1985
TRUE
FALSE
C++ was developed by Dr. Bjarne Strustroup between 1983-1985
TRUE
FALSE
C++ was developed by Dr. Bjarne Stroustrup between 1986-1988
TRUE
FALSE
C was developed by Dennis Ritchie in 1972
TRUE
FALSE
C was developed by Dennis Richards in 1972
TRUE
FALSE
C++ was developed by Dennis Ritchie in 1972
TRUE
FALSE
C was developed by Dennis Richards in 1975
TRUE
FALSE
C was developed by Dennis Richards in 1975
TRUE
FALSE
"IDE" means Integrated Development Environment
TRUE
FALSE
"IDE" means International Development Environment
TRUE
FALSE
"ANSI" means American National Standards Institute
TRUE
FALSE
"ANSI" means American National Standards Institution
TRUE
FALSE
"IOS" means International Organization for Standardization
TRUE
FALSE
"ISO" means International Organization for Standardization
TRUE
FALSE
Computers can only understand machine language
TRUE
FALSE
Computers can only understand 0's and 1's
TRUE
FALSE
Computers can only understand Binary Digits
TRUE
FALSE
In this programming language, each instruction is identified by a short abbreviation and names and other numbers can be used.
High level language
Assembly Language
English language
Machine language
These programming languages are designed to allow the programmer to write programs without having to be as concerned about what kind of computer the program will be run on
High level language
Assembly Language
English language
Machine language
___________ is a program that reads source code and produces a stand-alone executable program that can then be run
Assembler
Compiler
Software
Code
______________ is a program that directly executes the instructions in the source code without requiring them to be compiled into an executable first.
Compiler
Assembler
Interpreter
Code
Back when computers were first invented, programmers had to write programs directly in machine language, which was a very difficult and time consuming thing to do
TRUE
FALSE
The smallest unit of data that a computer can process and store is called bit
TRUE
FALSE
The smallest unit of data that a computer can process and store is called data
TRUE
FALSE
What is the only function all C++ programs must contain?
start()
system()
main()
program()
What punctuation is used to signal the beginning and end of code blocks?
{ }
-> and <-
BEGIN and END
( and )
Which of the following is a correct comment?
*/ Comments */
** Comment **
/* Comment */
{ Comment }
The process of giving a value to a variable
declaration
naming
instantiation
assigning
Program
int main()
{
cout<<"Hi everybody";
return 0;
}
An array is a variable that can store multiple items of data
– unlike a regular variable, which can only store one piece of data.
TRUE
FALSE
A “variable” is like a container in a C++ program in which a data
value can be stored inside the computer’s memory.
TRUE
FALSE
________________operators can form expressions with two
operands for addition +, subtraction -, multiplication *,
division /, or modulus %
Arithmetic
Logical
Local
International
___________ operators can form expressions comparing two
operands for equality ==, inequality !=, greater >, lesser <,
greater or equal >=, and lesser or equal <= values
Arithmetic
Logical
Ternary
Comparison
The logical ___ operator returns the inverse boolean value of a
single operand
!
i
&&
||
Logical && and || operators form expressions evaluating two
operands to return a boolean value of true or false
!
i
&&
||
It means "add 1 to variable"
--
&&
++
||
It means "subtract 1 to variable"
--
&&
++
||
____ and ____operators modify a single
operand by a value of one
--
&&
++
||
The assignment = operator can be combined with an
arithmetical operator to perform an arithmetical calculation
then assign its result
TRUE
FALSE
The logical i operator returns the inverse boolean value of a
single operand
TRUE
FALSE
Comparison operators can form expressions with two
operands for addition +, subtraction -, multiplication *,
division /, or modulus %
TRUE
FALSE
Arithmetic operators can form expressions with two
operands for addition +, subtraction -, multiplication *,
division /, or modulus %
TRUE
FALSE
Comparison operators can form expressions comparing two
operands for equality ==, inequality !=, greater >, lesser <,
greater or equal >=, and lesser or equal <= values
TRUE
FALSE
Logical operators can form expressions comparing two
operands for equality ==, inequality !=, greater >, lesser <,
greater or equal >=, and lesser or equal <= values
TRUE
FALSE
TRUE OR TRUE IS
TRUE
FALSE
TRUE OR FALSE IS
TRUE
FALSE
FALSE OR FALSE IS
TRUE
FALSE
FALSE AND FALSE IS
TRUE
FALSE
TRUE AND FALSE IS
TRUE
FALSE
TRUE AND TRUE IS
TRUE
FALSE
FASLE AND TRUE IS
TRUE
FALSE
FASLE OR TRUE IS
TRUE
FALSE
The statement x /= y means
x = (x/y)
x = (x+y)
x = (x*y)
x = (x-y)
The statement x++ means
x = x + 1
x = (x + 1)
x = (x * 1)
x = (x - 1)
1 < 0
TRUE
FALSE
0 > 1
TRUE
FALSE
0 < 1
TRUE
FALSE
1 > 0
TRUE
FALSE
1 != 0
TRUE
FALSE
0 != 1
TRUE
FALSE
!0
TRUE
FALSE
!1
TRUE
FALSE
How many iterations will the for loop have?
9
10
11
12
What value of the step increment of the variable n ?
0
1
2
3
What will be the value of m on the 5th iteration?
8
9
10
11
What will be the value of n on the final iteration?
8
9
10
11
What will be the value of m on the final iteration?
16
10
20
22
