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. In inheritance the ____________ is the class the receives the inherited members.
auto
derived class
Preprocessor
non-static
2. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
cmath
pointer
const datatype identifier = value
Preprocessor
3. The process of placing the elements of an array in order is called ________ the array.
inheritance
friend
sorting
function call
4. A set of values together with a set of operations
cin >> variable
base class
data type
operator
5. The ________ statement in a called function passes the value of an expression back to the calling function.
continue
static_cast<char>(65)
return
inheritance
6. Used to qualify hidden names so that they can be used.
Closing brace
heap
% modulus
scope resolution operator
7. Two slash marks ( // ) indicate __________ of a comment
>>
operand value
beginning
setw
8. A variable that holds the address of another variable.
floating-point
pointer
dot (.)
Sentinel
9. This manipulator causes the field to be left-justified with padding spaces printed to the right.
endl (same as 'n')
static
non-static
left
10. A filestream variable that represents the default input source
object file
break
register
cin
11. Associate an identifier with a memory location
globals
recursive function
mixed expression
allocating memory
12. Use 2 characters to represent one
#include <headerfilename>
escape sequences
function scope
semantics
13. The stream insertion operator
*
binary operator
associations
<<
14. Member objects are constructed __________ their enclosing class object.
if...else
non-static
object-oriented analysis and design (OOAD)
before
15. 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.
mixed expression
inheritance
Semicolon
/n
16. The symbol for the binary scope resolution operator
operand value
::
friend
Stack overflow
17. In inheritance the ____________ is the class that supplies the inherited members.
0
<<
base class
unary operator
18. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
friend
function prototype
heap
&
19. The size & shape & color and weight of an object are considered
static_cast<char>(65)
setw
scope
attributes
20. A function is invoked with a ________.
function call
<<
address
Sentinel
21. Every C++ program begins execution at the function _________.
main
#include directive
operand value
Unified Modeling Language(UML)
22. __________ can be used to assign an object of a class to another object of the same class.
Default memberwise assignment
preprocessor
comments
case sensitive
23. Repeating a set of instructions a specific number of times is called_________repetition.
searching
recursive function
Counter-controlled or definite
&
24. The ________ program combines the output of the compiler with various library functions to produce an executable image.
derived class
special symbols
srand
linker
25. You must have a ___________ for every variable you intend to use in a program
operator
Default memberwise assignment
before
definition
26. 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
private
base
object-oriented analysis and design (OOAD)
subscript (or index)
27. Causes the program to immediately goes back to the top of the loop. the remainder of the statements in the loop are ignored for this current iteration.
selection
globals
continue
special symbols
28. A sequence of operands and operators that describe a calculation to be performed
named constant
t
arithmetic expression
classes
29. Identifier or expression that is part of the calculation to be performed
operand value
Closing brace
beginning
srand
30. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
register
arithmetic expression
setw
preprocessor
31. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
token
switch
arithmetic expression
allocating memory
32. This manipulator is used to establish a field width for the value immediately following it.
assignment statement
setw
fstream
static
33. The sign you use for references
int values
&
*
this
34. A ________ program executes before the compiler's translation phase begins.
continue
access specifier
preprocessor
source file
35. 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.
operator
dot (.)
type
mixed expression
36. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
arithmetic expression
operator overloading
Unified Modeling Language(UML)
address
37. The sign you use for pointers
*
classes
return
integer operands
38. Class members specified as _________ are accessible anywhere an object of the class is in scope.
public
switch
definition
break
39. Keyword public is a(n) _________
access specifier
semantics
static
continue
40. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
beginning
this
recursive function
continue
41. A function that calls itself
whitespace
recursive function
rand
base
42. The ________ program transfers the executable image of a C++ program from disk to memory.
loader
access specifier
new line
unary scope resolution operator (::)
43. An expression that has operands with different data types
assignment
assignment statement
vectors
mixed expression
44. An expression in which all operands have the same data type - result will have the same data type as operands
stack
address
t
like-type expression
45. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
type
Semicolon
function prototype
semicolon
46. All ______ must be declared before they are used.
variables
constant variable
#include directive
>>
47. A member function should be declared static if it does not access __________ class members.
preprocessor
special symbols
function overloading
non-static
48. Forces the computer to display decimal point and trailing zeroes
token
showpoint
data type
fixed
49. Symbol that denotes an action to be performed
void
virtual functions
operator
function parameters
50. C++ programs are normally typed into a computer using a(n) ________ program.
pointer
#include directive
editor
showpoint