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. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
const datatype identifier = value
type
recursive
void
2. 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.
.cpp
semicolon
object-oriented analysis and design (OOAD)
void
3. If a member initializer is not provided for a member object of a class the object's __________ is called.
overloading
&
definition
default constructor
4. Sets floating-point values to a fixed decimal format
&
fixed
ofstream
floating-point
5. Class members are accessed via the ________ operator in conjunction with the name of an object (or reference to an object) of the class or via the arrow (->) operator in conjunction with a pointer to an object of the class.
% modulus
function prototype
Counter-controlled or definite
dot (.)
6. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
whitespace
Stack overflow
if...else
<<
7. 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.
function overloading
virtual functions
object file
static
8. These are data items whose values do not change while the program is running
Sentinel
Literals
function scope
endl (same as 'n')
9. A filestream variable that represents the default input source
.cpp
cin
access specifier
definition
10. Two slash marks ( // ) indicate __________ of a comment
pointer
main
const
beginning
11. Operator with only one operand
unary operator
comments
main
associations
12. Used for dynamically allocated variables
Closing brace
register
heap
inline functions
13. An expression in which all operands have the same data type - result will have the same data type as operands
t
like-type expression
function parameters
source file
14. Syntax for named constant declaration
const datatype identifier = value
member
preprocessor
local variable
15. The size & shape & color and weight of an object are considered
*
attributes
comments
classes
16. The ________ of an identifier is the portion of the program in which the identifier can be used.
constant variable
type coercion
scope
attributes
17. Initializers __________ must be used to initialize constant members of a class.
/n
const datatype identifier = value
template
member
18. directive A statement that starts with a # is called a ____________.
Preprocessor
static_cast<char>(65)
vectors
semicolon
19. 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.
const
operator overloading
inheritance
data type
20. 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.
new line
/n
loader
break
21. Member objects are constructed __________ their enclosing class object.
void pointer
default constructor
beginning
before
22. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
access specifier
register
recursive
break
23. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
binary operator
private
new line
escape sequences
24. __________ can be used to assign an object of a class to another object of the same class.
case sensitive
t
Default memberwise assignment
switch
25. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
semantics
operator overloading
Counter-controlled or definite
attributes
26. The only integer that can be assigned directly to a pointer is_____________.
Literals
0
object-oriented analysis and design (OOAD)
const
27. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
a.out
::
derived class
const
28. A function that calls itself
recursive function
pointer
definition
arithmetic expression
29. Identifier or expression that is part of the calculation to be performed
function parameters
floating-point
delete
operand value
30. The ________ program combines the output of the compiler with various library functions to produce an executable image.
assignment statement
stack
before
linker
31. You must have a ___________ for every variable you intend to use in a program
continue
type
definition
global
32. The ________ program transfers the executable image of a C++ program from disk to memory.
dot (.)
type
loader
public
33. Characters used to separate symbols or reserved words or identifiers and statements
whitespace
setw
#include <headerfilename>
function prototype
34. The process of placing the elements of an array in order is called ________ the array.
cin >> variable
selection
0
sorting
35. tab
before
t
cin
function prototype
36. The ________ qualifier is used to declare read-only variables.
case sensitive
const
&
static
37. int namespace include using return examples of ___________
searching
before
reserve words
strcpy()
38. The number used to refer to a particular element of an array is called its ________.
semicolon
base class
derived class
subscript (or index)
39. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
switch
before
rand
const
40. The symbol for the binary scope resolution operator
Sentinel
::
associations
*
41. Operator with two operands
pointer
binary operator
int values
template
42. Program components in C++ are called functions and ________.
classes
variables
associations
function scope
43. To allow file access in a program you must #include this header file.
derived class
static
token
fstream
44. The sign you use for pointers
*
special symbols
global
t
45. The stream insertion operator
definition
<<
delete
searching
46. When it is not known in advance how many times a set of statements will be repeated a _________value can be used to terminate the repetition.
unary operator
&
loader
Sentinel
47. The stream extraction operator
searching
return
cin
>>
48. Used to qualify hidden names so that they can be used.
scope resolution operator
token
named constant
pointer
49. Keyword public is a(n) _________
reserved words
named constant
access specifier
a.out
50. Every C++ statement ends with a(n) _________.
before
rand
semicolon
Stack overflow