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. 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.
Sentinel
dot (.)
static
stack
2. The _________ begins the body of every function and the _________ ends the body of every function.
?
{ }
scope
void
3. A __________ data member represents class-wide information.
#include
void
setw
static
4. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
#include
template
friend
const
5. The ________ program combines the output of the compiler with various library functions to produce an executable image.
definition
linker
type casting (conversion)
like-type expression
6. Words that are used for special purposes in a program
data type
reserved words
local variable
private
7. The elements of an array are related by the fact that they have the same name and ___________.
virtual functions
Unified Modeling Language(UML)
cout
type
8. The address-of operator. it is used to assign pointers and to print the address of variables.
static
&
Counter-controlled or definite
mixed expression
9. Class members specified as _________ are accessible anywhere an object of the class is in scope.
Sentinel
floating-point
public
virtual functions
10. The stream extraction operator
>>
delete
attributes
function call
11. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
static
prompt
recursive
//
12. 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
<<
switch
*
base
13. Function ________ is used to produce random numbers.
recursive function
classes
rand
semantics
14. Classes can have relationships with other classes. These relationships are called ________.
return
associations
operator
?
15. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
type casting (conversion)
overloading
Stack overflow
information hiding
16. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
globals
switch
non-static
classes
17. An array that uses two subscripts is referred to as a(n) _________ array.
rand
default constructor
two-dimensional
private
18. Repeating a set of instructions a specific number of times is called_________repetition.
public
binary operator
getline
Counter-controlled or definite
19. The process of determining if an array contains a particular key value is called _________ the array.
searching
Literals
cout
object file
20. All ______ must be declared before they are used.
base
new line
variables
floating-point
21. int namespace include using return examples of ___________
searching
reserve words
token
allocating memory
22. An expression in which all operands have the same data type - result will have the same data type as operands
polymorphism
#include <headerfilename>
arithmetic expression
like-type expression
23. Sets floating-point values to a fixed decimal format
Closing brace
fixed
selection
?
24. A pointer is a variable that contains as its value the____________ of another variable.
function call
inheritance
inline functions
address
25. This manipulator is used to establish a field width for the value immediately following it.
comments
setw
polymorphism
vectors
26. When a value of one data type is implicitly (automatically) changed to another data type
type coercion
reserved words
void
selection
27. The ________ statement in a called function passes the value of an expression back to the calling function.
loader
allocating memory
member
return
28. Associate an identifier with a memory location
const
/n
strcpy()
allocating memory
29. 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.
editor
operand value
fixed
inheritance
30. A C++ statement that makes a decision is ______.
classes
function overloading
left
if
31. A type of pointer that can point at objects of any data type.
mixed expression
continue
void pointer
Semicolon
32. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
main
void
>>
pointer
33. The storage-class specifiers are mutable - auto - ________ - extern and static.
auto
register
int values
allocating memory
34. You must have a ___________ for every variable you intend to use in a program
preprocessor
definition
static
associations
35. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
Closing brace
overloading
source file
pointer
36. tab
operator
strcmp()
token
t
37. The only integer that can be assigned directly to a pointer is_____________.
0
sorting
fstream
named constant
38. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
special symbols
template
break
Unified Modeling Language(UML)
39. Whole numbers - no decimals and no commas included
continue
a.out
address
int values
40. If a member initializer is not provided for a member object of a class the object's __________ is called.
setw
globals
strcpy()
default constructor
41. The modulus operator (%) can be used only with __________.
function call
integer operands
mixed expression
local variable
42. 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.
n
Unified Modeling Language(UML)
dot (.)
&
43. A memory location with a name and data type - its content may be changed during program execution
this
information hiding
void pointer
variable
44. A set of values together with a set of operations
.cpp
data type
Literals
associations
45. 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.
object file
virtual functions
Closing brace
preprocessor
46. Used to qualify hidden names so that they can be used.
setw
scope resolution operator
object file
auto
47. Creates a copy of a string.
strcpy()
int values
special symbols
token
48. The __________ operator reclaims memory previously allocated by new.
type coercion
private
delete
member
49. Compares two strings and returns 0 if they are equal.
global
strcmp()
void
identifiers
50. A file must be ________ before data can be written to or read from it.
opened
assignment
inheritance
const datatype identifier = value