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 three values that can be used to initialize a pointer are 0 - __________ and an address.
NULL
void
n
searching
2. Class members specified as _________ are accessible anywhere an object of the class is in scope.
new line
public
return
static
3. The ________ program transfers the executable image of a C++ program from disk to memory.
assignment
variables
reserved words
loader
4. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
operator
semantics
Literals
const
5. 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.
function call
associations
unary scope resolution operator (::)
inheritance
6. Syntax for named constant declaration
overloading
classes
Counter-controlled or definite
const datatype identifier = value
7. The __________ operator reclaims memory previously allocated by new.
if
delete
function call
>>
8. The storage-class specifiers are mutable - auto - ________ - extern and static.
subscript (or index)
comments
register
integer operands
9. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
register
Default memberwise assignment
data type
left
10. Naming convention for C++ programs
.cpp
return
local variable
data type
11. The ________ of an identifier is the portion of the program in which the identifier can be used.
scope
continue
data type
classes
12. A C++ statement that makes a decision is ______.
pointer
operand value
if
function overloading
13. Forces the computer to display decimal point and trailing zeroes
whitespace
showpoint
public
Closing brace
14. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
function prototype
recursive
before
switch
15. Used for dynamically allocated variables
main
global
heap
preprocessor
16. An expression in which all operands have the same data type - result will have the same data type as operands
like-type expression
function scope
unary scope resolution operator (::)
register
17. The elements of an array are related by the fact that they have the same name and ___________.
dot (.)
type
constant variable
two-dimensional
18. Type casting syntax
register
searching
char
static_cast<char>(65)
19. To allow file access in a program you must #include this header file.
return
fstream
rand
const
20. A function is invoked with a ________.
function call
switch
local variable
token
21. All C++ Variables are_________.
function scope
template
case sensitive
Closing brace
22. Associate an identifier with a memory location
two-dimensional
allocating memory
opened
identifiers
23. The ________ enables access to a global variable with the same name as a variable in the current scope.
unary scope resolution operator (::)
constant variable
linker
friend
24. The sign you use for references
&
void
char
comments
25. Operator with only one operand
0
function call
getline
unary operator
26. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
pointer
<<
break
recursive function
27. The process of analyzing and designing a system from an object-oriented point of view is called ________.
return
object-oriented analysis and design (OOAD)
classes
cin
28. A variable that holds the address of another variable.
source file
&
definition
pointer
29. * / % + -
Arithmetic Operators
private
static
classes
30. A function that can be used to read character data including whitespace
return
#include
cin.get(ch)
continue
31. The process of placing the elements of an array in order is called ________ the array.
searching
sorting
NULL
function call
32. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
scope
scope resolution operator
default constructor
named constant
33. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
break
&
showpoint
semantics
34. A sequence of operands and operators that describe a calculation to be performed
arithmetic expression
strcmp()
variable
getline
35. The escape sequence ___ when output with cout and the stream insertion operator - causes the cursor to position to the beginning of the next line on the screen.
scope resolution operator
syntax
/n
inheritance
36. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
member
floating-point
if...else
non-static
37. data types that refer to numbers with decimals
floating-point
unary operator
constant variable
heap
38. Initializers __________ must be used to initialize constant members of a class.
strlen()
register
member
new line
39. The ________ qualifier is used to declare read-only variables.
mixed expression
preprocessor
special symbols
const
40. When a value of one data type is implicitly (automatically) changed to another data type
recursive function
type coercion
this
setw
41. Used to qualify hidden names so that they can be used.
dot (.)
scope resolution operator
reserved words
ofstream
42. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
function overloading
cmath
Sentinel
new line
43. The ________ program combines the output of the compiler with various library functions to produce an executable image.
fixed
searching
linker
srand
44. Words that are used for special purposes in a program
function overloading
Preprocessor
reserved words
comments
45. tab
t
delete
object-oriented analysis and design (OOAD)
#include directive
46. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
comments
information hiding
assignment statement
auto
47. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
fstream
ofstream
void
base class
48. 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
const
>>
variables
49. __________ can be used to assign an object of a class to another object of the same class.
n
Sentinel
#include
Default memberwise assignment
50. A pointer is a variable that contains as its value the____________ of another variable.
prompt
address
function parameters
fixed