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. These are data items whose values do not change while the program is running
public
floating-point
reserve words
Literals
2. The process of placing the elements of an array in order is called ________ the array.
allocating memory
variables
Sentinel
sorting
3. The size & shape & color and weight of an object are considered
function prototype
scope
attributes
operator overloading
4. The number used to refer to a particular element of an array is called its ________.
constant variable
prompt
object-oriented analysis and design (OOAD)
subscript (or index)
5. The modulus operator (%) can be used only with __________.
getline
function overloading
friend
integer operands
6. Preprocessor directive syntax
NULL
left
opened
#include <headerfilename>
7. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
friend
n
<<
assignment
8. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
recursive
function scope
classes
left
9. An operator that can only be used with int values. result will always be an int.
function overloading
identifiers
allocating memory
% modulus
10. A function is invoked with a ________.
like-type expression
//
escape sequences
function call
11. A variable declared outside any block or function is a ________ variable.
//
global
const datatype identifier = value
cout
12. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
heap
pointer
searching
unary operator
13. A file must be ________ before data can be written to or read from it.
*
const datatype identifier = value
opened
template
14. If a member initializer is not provided for a member object of a class the object's __________ is called.
inline functions
default constructor
heap
like-type expression
15. For a local variable in a function to retain its value between calls to the function it must be declared with the ________ storage-class specifier.
static
preprocessor
subscript (or index)
/n
16. The stream extraction operator
return
this
associations
>>
17. A C++ statement that makes a decision is ______.
if
default constructor
reserve words
n
18. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
rand
if...else
operator overloading
stack
19. This manipulator is used to establish a field width for the value immediately following it.
subscript (or index)
void
setw
derived class
20. All ______ must be declared before they are used.
new line
base
const
variables
21. The process of analyzing and designing a system from an object-oriented point of view is called ________.
source file
function overloading
object-oriented analysis and design (OOAD)
new line
22. An array that uses two subscripts is referred to as a(n) _________ array.
object file
two-dimensional
scope resolution operator
register
23. Keyword public is a(n) _________
access specifier
whitespace
object file
editor
24. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
virtual functions
static
pointer
return
25. An expression in which all operands have the same data type - result will have the same data type as operands
type
like-type expression
continue
unary scope resolution operator (::)
26. A variable that is known only within the function in which it is defined is called a ________.
local variable
type
special symbols
global
27. Type casting syntax
Closing brace
reserved words
static_cast<char>(65)
overloading
28. Objects have the property of ________although objects may know how to communicate with one another across well-defined interfaces - they normally are not allowed to know how other objects are implemented.
continue
information hiding
definition
function scope
29. Forces the computer to display decimal point and trailing zeroes
Semicolon
0
showpoint
like-type expression
30. Lists and tables of values can be stored in arrays or __________.
local variable
vectors
ofstream
allocating memory
31. The idea that you can call the same function and the output will depend on the type of object you're using.
polymorphism
{ }
n
object-oriented analysis and design (OOAD)
32. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
polymorphism
inline functions
template
new line
33. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
break
constant variable
searching
private
34. Words that are used for special purposes in a program
globals
reserved words
loader
prompt
35. A constant object must be __________; it cannot be modified after it is created.
mixed expression
return
NULL
initialized
36. The __________ operator reclaims memory previously allocated by new.
arithmetic expression
delete
semantics
public
37. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
*
default constructor
operand value
function prototype
38. The sign you use for pointers
srand
stack
*
::
39. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
inheritance
break
classes
?
40. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
token
<<
semantics
*
41. A function that calls itself
::
recursive function
derived class
type coercion
42. The storage-class specifiers are mutable - auto - ________ - extern and static.
#include
static
register
cin
43. int namespace include using return examples of ___________
globals
Arithmetic Operators
reserve words
subscript (or index)
44. A __________ should be used to declare the size of an array because it makes the program more scalable.
/n
integer operands
cout
constant variable
45. A sequence of operands and operators that describe a calculation to be performed
function parameters
arithmetic expression
.cpp
template
46. 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.
dot (.)
setw
static
attributes
47. A function that can be used to read character data including whitespace
reserved words
editor
cin.get(ch)
opened
48. newline
global
n
sorting
function parameters
49. Used for function calls and local variables
cin
syntax
variables
stack
50. The _________ begins the body of every function and the _________ ends the body of every function.
{ }
Unified Modeling Language(UML)
virtual functions
continue