SUBJECTS
|
BROWSE
|
CAREER CENTER
|
POPULAR
|
JOIN
|
LOGIN
Business Skills
|
Soft Skills
|
Basic Literacy
|
Certifications
About
|
Help
|
Privacy
|
Terms
|
Email
Search
Test your basic knowledge |
C++ Programming Basics
Start Test
Study First
Subject
:
it-skills
Instructions:
Answer 50 questions in 15 minutes.
If you are not ready to take this test, you can
study here
.
Match each statement with the correct term.
Don't refresh. All questions and answers are randomly picked and ordered every time you load a test.
This is a study tool. The 3 wrong answers for each question are randomly chosen from answers to other questions. So, you might find at times the answers obvious, but you will see it re-enforces your understanding as you take the test each time.
1. Manipulator that causes the insertion point (cursor) to move to the beginning of the next line
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
2. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
#include
base class
Stack overflow
auto
3. When you create a ___________________in the base class and then call it using an object the function will know to look in the inherited class for the specifics of that function.
reserve words
token
virtual functions
.cpp
4. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
constant variable
pointer
function call
function overloading
5. A constant object must be __________; it cannot be modified after it is created.
>>
*
initialized
polymorphism
6. If a member initializer is not provided for a member object of a class the object's __________ is called.
default constructor
searching
return
floating-point
7. An expression in which all operands have the same data type - result will have the same data type as operands
like-type expression
function prototype
dot (.)
void
8. Operator with only one operand
scope
ofstream
unary operator
stack
9. The sign you use for references
&
source file
access specifier
Stack overflow
10. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
unary operator
showpoint
member
overloading
11. The storage-class specifiers are mutable - auto - ________ - extern and static.
void pointer
register
if...else
beginning
12. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
classes
?
member
dot (.)
13. A function ________ enables a single function to be defined to perform a task on many different data types.
rand
two-dimensional
t
template
14. Lists and tables of values can be stored in arrays or __________.
scope resolution operator
data type
vectors
Arithmetic Operators
15. The three values that can be used to initialize a pointer are 0 - __________ and an address.
heap
NULL
mixed expression
#include
16. This is used to mark the end of a complete C++ programming statement.
endl (same as 'n')
.cpp
named constant
Semicolon
17. The __________ operator reclaims memory previously allocated by new.
delete
#include directive
unary scope resolution operator (::)
default constructor
18. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
friend
two-dimensional
?
&
19. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
searching
special symbols
register
loader
20. Executable version of program
operator overloading
static
object file
assignment
21. When a value of one data type is implicitly (automatically) changed to another data type
type coercion
function scope
base class
arithmetic expression
22. A __________ data member represents class-wide information.
operand value
static
Preprocessor
Stack overflow
23. data types that refer to numbers with decimals
0
break
floating-point
endl (same as 'n')
24. To explicitly indicate that a value is to be converted to another type
type casting (conversion)
continue
loader
% modulus
25. The conditional operator. it evaluates a line of code and returns one thing if the condition is true and a different thing if the condition is false.
linker
?
assignment
variables
26. directive A statement that starts with a # is called a ____________.
function parameters
Preprocessor
object-oriented analysis and design (OOAD)
char
27. An array that uses two subscripts is referred to as a(n) _________ array.
dot (.)
two-dimensional
left
cmath
28. The stream insertion operator
base class
<<
function prototype
object file
29. For every opening brace in a C++ program there must be a ______________.
beginning
#include directive
Closing brace
<<
30. Identifier or expression that is part of the calculation to be performed
operand value
overloading
before
0
31. * / % + -
/n
operator overloading
Arithmetic Operators
stack
32. The ________ program combines the output of the compiler with various library functions to produce an executable image.
linker
named constant
rand
register
33. A memory location with a name and data type - its content may be changed during program execution
data type
type coercion
variable
void pointer
34. Used for dynamically allocated variables
heap
const
case sensitive
Closing brace
35. A recursive function typically has two components: One that provides a means for the recursion to terminate by testing for a(n) ________ case and one that expresses the problem as a recursive call for a slightly simpler problem than the original call
base
derived class
pointer
static
36. Keyword public is a(n) _________
left
syntax
fstream
access specifier
37. The elements of an array are related by the fact that they have the same name and ___________.
void
this
type
<<
38. All C++ Variables are_________.
integer operands
showpoint
case sensitive
object-oriented analysis and design (OOAD)
39. Classes can have relationships with other classes. These relationships are called ________.
searching
associations
information hiding
heap
40. A human readable file that contains C++ program
prompt
mixed expression
cin
source file
41. Syntax for named constant declaration
auto
const datatype identifier = value
static
Default memberwise assignment
42. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
source file
% modulus
opened
selection
43. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
this
whitespace
if...else
special symbols
44. Forces the computer to display decimal point and trailing zeroes
&
escape sequences
Counter-controlled or definite
showpoint
45. Function ________ is used to set the random number seed to randomize a program.
Preprocessor
srand
operator overloading
showpoint
46. Operator with two operands
.cpp
operator
local variable
binary operator
47. The _________ begins the body of every function and the _________ ends the body of every function.
template
int values
{ }
private
48. A function is invoked with a ________.
function call
static
static
scope resolution operator
49. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
break
base
before
showpoint
50. The size & shape & color and weight of an object are considered
unary operator
scope
attributes
const