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. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
static_cast<char>(65)
semantics
prompt
static
2. * / % + -
Unified Modeling Language(UML)
*
Arithmetic Operators
strcmp()
3. Operator with only one operand
assignment statement
unary operator
showpoint
variable
4. C++ programs are normally typed into a computer using a(n) ________ program.
cin
globals
editor
recursive function
5. A ________ program executes before the compiler's translation phase begins.
NULL
preprocessor
escape sequences
variables
6. An operator that can only be used with int values. result will always be an int.
mixed expression
::
% modulus
type coercion
7. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
void pointer
friend
dot (.)
const datatype identifier = value
8. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
two-dimensional
object file
return
function parameters
9. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
auto
case sensitive
function scope
Stack overflow
10. The ________ program combines the output of the compiler with various library functions to produce an executable image.
linker
source file
semantics
cin >> variable
11. Every C++ program begins execution at the function _________.
setw
cout
Counter-controlled or definite
main
12. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
unary operator
Unified Modeling Language(UML)
named constant
pointer
13. Function ________ is used to set the random number seed to randomize a program.
sorting
srand
initialized
getline
14. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
#include <headerfilename>
default constructor
switch
function prototype
15. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
unary scope resolution operator (::)
pointer
object-oriented analysis and design (OOAD)
return
16. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
subscript (or index)
void
function parameters
const
17. The number used to refer to a particular element of an array is called its ________.
variables
information hiding
subscript (or index)
classes
18. A C++ statement that makes a decision is ______.
initialized
stack
register
if
19. A member function should be declared static if it does not access __________ class members.
function call
left
NULL
non-static
20. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
//
function scope
function overloading
cin >> variable
21. An array that uses two subscripts is referred to as a(n) _________ array.
two-dimensional
unary operator
#include directive
cmath
22. The three values that can be used to initialize a pointer are 0 - __________ and an address.
virtual functions
NULL
main
type casting (conversion)
23. tab
pointer
t
static_cast<char>(65)
public
24. Identifier or expression that is part of the calculation to be performed
ofstream
operand value
delete
preprocessor
25. 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.
auto
inheritance
operator
pointer
26. A function that can be used to read character data including whitespace
cin.get(ch)
integer operands
base class
Closing brace
27. Repeating a set of instructions a specific number of times is called_________repetition.
vectors
heap
mixed expression
Counter-controlled or definite
28. 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.
preprocessor
dot (.)
continue
&
29. The ________ program transfers the executable image of a C++ program from disk to memory.
recursive
if
{ }
loader
30. A __________ data member represents class-wide information.
static
stack
access specifier
attributes
31. 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
semantics
base
::
inheritance
32. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
assignment statement
allocating memory
globals
a.out
33. A set of values together with a set of operations
>>
main
data type
NULL
34. The ________ enables access to a global variable with the same name as a variable in the current scope.
&
unary scope resolution operator (::)
scope
access specifier
35. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
comments
&
Unified Modeling Language(UML)
recursive function
36. Naming convention for C++ programs
Semicolon
virtual functions
.cpp
t
37. Every C++ statement ends with a(n) _________.
inline functions
semicolon
rand
unary operator
38. A filestream variable that represents the default input source
if...else
linker
cin
>>
39. You must have a ___________ for every variable you intend to use in a program
editor
preprocessor
% modulus
definition
40. A variable that is known only within the function in which it is defined is called a ________.
int values
local variable
strcmp()
register
41. Used for function calls and local variables
type casting (conversion)
cin.get(ch)
stack
?
42. The _____ causes the contents of another file to be inserted into a program.
auto
if...else
char
#include directive
43. Operator with two operands
beginning
binary operator
address
getline
44. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
variable
//
if
token
45. This manipulator causes the field to be left-justified with padding spaces printed to the right.
return
left
cmath
subscript (or index)
46. Function ________ is used to produce random numbers.
new line
type casting (conversion)
rand
syntax
47. 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.
unary operator
operator overloading
static_cast<char>(65)
void
48. A pointer is a variable that contains as its value the____________ of another variable.
global
address
% modulus
function overloading
49. A constant object must be __________; it cannot be modified after it is created.
initialized
global
const
linker
50. You can declare default values for a function in the ____________________.
syntax
constant variable
endl (same as 'n')
function parameters