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 member function should be declared static if it does not access __________ class members.
Semicolon
.cpp
fixed
non-static
2. Two slash marks ( // ) indicate __________ of a comment
a.out
/n
beginning
loader
3. Most calculations are normally performed by ______ statements.
function call
register
assignment
?
4. The process of analyzing and designing a system from an object-oriented point of view is called ________.
recursive function
object-oriented analysis and design (OOAD)
information hiding
variable
5. When a value of one data type is implicitly (automatically) changed to another data type
virtual functions
local variable
void pointer
type coercion
6. The modulus operator (%) can be used only with __________.
void pointer
assignment statement
integer operands
?
7. An expression in which all operands have the same data type - result will have the same data type as operands
address
type coercion
like-type expression
?
8. A function that calls itself
polymorphism
special symbols
token
recursive function
9. The sign you use for references
>>
&
rand
virtual functions
10. Classes can have relationships with other classes. These relationships are called ________.
object file
pointer
two-dimensional
associations
11. The stream extraction operator
selection
>>
&
virtual functions
12. Member objects are constructed __________ their enclosing class object.
type casting (conversion)
overloading
char
before
13. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
type
srand
local variable
cin >> variable
14. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
char
allocating memory
#include
type coercion
15. A filestream variable that represents the default output device
NULL
cout
reserved words
special symbols
16. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
unary scope resolution operator (::)
inline functions
function prototype
vectors
17. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
globals
reserve words
classes
continue
18. A sequence of operands and operators that describe a calculation to be performed
globals
searching
arithmetic expression
named constant
19. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
global
const
static_cast<char>(65)
inline functions
20. Preprocessor directive syntax
#include <headerfilename>
>>
getline
information hiding
21. A __________ data member represents class-wide information.
static
void
rand
vectors
22. Function ________ is used to produce random numbers.
variables
rand
recursive function
loader
23. Associate an identifier with a memory location
global
operand value
allocating memory
object-oriented analysis and design (OOAD)
24. * / % + -
strlen()
Arithmetic Operators
cin.get(ch)
fstream
25. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
definition
assignment
globals
loader
26. Default name of executable file
auto
syntax
void
a.out
27. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
cout
arithmetic expression
void
register
28. Symbol that denotes an action to be performed
scope resolution operator
scope
function prototype
operator
29. Every C++ statement ends with a(n) _________.
semicolon
semantics
derived class
heap
30. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
semantics
const
comments
classes
31. Nonexecutable statements that are included in a program to provide information about what the program does etc.
comments
strcmp()
pointer
overloading
32. The idea that you can call the same function and the output will depend on the type of object you're using.
polymorphism
::
void
cmath
33. The symbol for the binary scope resolution operator
function overloading
sorting
::
operator
34. Names of things that are used in a program - can apply to variables & constants and functions
% modulus
identifiers
comments
switch
35. Message displayed to the screen asking user for input; generated with an output statement
prompt
const
source file
Preprocessor
36. A variable that is known only within the function in which it is defined is called a ________.
searching
local variable
attributes
.cpp
37. A function ________ enables a single function to be defined to perform a task on many different data types.
template
opened
if
reserved words
38. The storage-class specifiers are mutable - auto - ________ - extern and static.
initialized
0
type coercion
register
39. The ________ qualifier is used to declare read-only variables.
t
syntax
rand
const
40. The ________ statement in a called function passes the value of an expression back to the calling function.
strlen()
access specifier
return
reserve words
41. In inheritance the ____________ is the class that supplies the inherited members.
base class
assignment
vectors
strlen()
42. A variable that holds the address of another variable.
pointer
data type
syntax
switch
43. Initializers __________ must be used to initialize constant members of a class.
member
classes
pointer
function scope
44. A pointer is a variable that contains as its value the____________ of another variable.
vectors
address
semantics
global
45. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
const
type casting (conversion)
mixed expression
new line
46. 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
fstream
subscript (or index)
base
inline functions
47. Keyword public is a(n) _________
access specifier
escape sequences
selection
recursive
48. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
case sensitive
before
register
type coercion
49. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
overloading
selection
static
Counter-controlled or definite
50. A C++ statement that makes a decision is ______.
rand
cin
preprocessor
if