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. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
prompt
pointer
static
loader
2. Message displayed to the screen asking user for input; generated with an output statement
setw
prompt
::
classes
3. The process of placing the elements of an array in order is called ________ the array.
getline
#include
sorting
source file
4. In inheritance the ____________ is the class the receives the inherited members.
derived class
function parameters
access specifier
Semicolon
5. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
rand
const
left
const datatype identifier = value
6. The __________ operator reclaims memory previously allocated by new.
delete
subscript (or index)
ofstream
NULL
7. An operator that can only be used with int values. result will always be an int.
function overloading
% modulus
public
#include directive
8. A function is invoked with a ________.
return
<<
searching
function call
9. Executable version of program
before
global
object file
semantics
10. A function ________ enables a single function to be defined to perform a task on many different data types.
template
two-dimensional
overloading
classes
11. A variable that holds the address of another variable.
pointer
integer operands
<<
?
12. Whole numbers - no decimals and no commas included
::
function call
loader
int values
13. Most calculations are normally performed by ______ statements.
ofstream
assignment
break
pointer
14. In inheritance the ____________ is the class that supplies the inherited members.
default constructor
inheritance
preprocessor
base class
15. A __________ should be used to declare the size of an array because it makes the program more scalable.
special symbols
two-dimensional
case sensitive
constant variable
16. 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.
type casting (conversion)
register
?
member
17. OOD also takes advantage of ________ relationships where new classes of objects are derived by absorbing characteristics of existing classes - then adding unique characteristics of their own.
static
left
inheritance
Literals
18. * / % + -
Arithmetic Operators
unary operator
Stack overflow
rand
19. The three values that can be used to initialize a pointer are 0 - __________ and an address.
classes
function call
NULL
strlen()
20. The ________ enables access to a global variable with the same name as a variable in the current scope.
endl (same as 'n')
cin.get(ch)
access specifier
unary scope resolution operator (::)
21. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
static_cast<char>(65)
break
function overloading
type
22. Function ________ is used to set the random number seed to randomize a program.
const
srand
friend
selection
23. The number used to refer to a particular element of an array is called its ________.
subscript (or index)
cout
definition
unary operator
24. A ________ program executes before the compiler's translation phase begins.
operator
preprocessor
if...else
globals
25. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
cin >> variable
loader
attributes
recursive
26. If a member initializer is not provided for a member object of a class the object's __________ is called.
/n
delete
base
default constructor
27. Identifier or expression that is part of the calculation to be performed
type coercion
polymorphism
operand value
classes
28. A human readable file that contains C++ program
source file
escape sequences
token
globals
29. 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.
recursive
new line
access specifier
virtual functions
30. Keyword public is a(n) _________
access specifier
preprocessor
classes
cmath
31. The keyword ________ is used in a function header to indicate that a function does not return a value or to indicate that a function contains no parameters.
searching
showpoint
void
#include
32. A sequence of operands and operators that describe a calculation to be performed
subscript (or index)
cmath
unary operator
arithmetic expression
33. A filestream variable that represents the default input source
case sensitive
overloading
binary operator
cin
34. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
static
rand
new line
object-oriented analysis and design (OOAD)
35. The elements of an array are related by the fact that they have the same name and ___________.
comments
type
function call
Default memberwise assignment
36. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
private
function prototype
showpoint
int values
37. Used for dynamically allocated variables
Stack overflow
//
heap
% modulus
38. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
n
escape sequences
globals
non-static
39. = & | are examples of ____________.
unary scope resolution operator (::)
special symbols
static_cast<char>(65)
classes
40. Syntax for named constant declaration
const datatype identifier = value
cmath
NULL
preprocessor
41. The symbol for the binary scope resolution operator
base class
operator overloading
>>
::
42. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
special symbols
named constant
const datatype identifier = value
operand value
43. tab
beginning
t
heap
function parameters
44. A set of values together with a set of operations
>>
base
data type
Default memberwise assignment
45. The stream insertion operator
non-static
<<
setw
return
46. An expression that has operands with different data types
polymorphism
mixed expression
endl (same as 'n')
integer operands
47. Lists and tables of values can be stored in arrays or __________.
editor
vectors
recursive function
fixed
48. Words that are used for special purposes in a program
reserved words
Default memberwise assignment
Counter-controlled or definite
Literals
49. When a value of one data type is implicitly (automatically) changed to another data type
initialized
a.out
type coercion
linker
50. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
strcmp()
if
initialized
overloading