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 function that calls itself either directly or indirectly - through another function) - is a ________ function.
source file
continue
recursive
Arithmetic Operators
2. Creates a copy of a string.
type coercion
strcmp()
strcpy()
member
3. Type casting syntax
const
classes
vectors
static_cast<char>(65)
4. All C++ Variables are_________.
type coercion
register
case sensitive
Sentinel
5. The ________ statement in a called function passes the value of an expression back to the calling function.
return
auto
polymorphism
register
6. To write data to a file you define an object of which one of the following
binary operator
floating-point
base class
ofstream
7. Function ________ is used to set the random number seed to randomize a program.
srand
const
escape sequences
register
8. The process of placing the elements of an array in order is called ________ the array.
overloading
sorting
opened
void
9. The elements of an array are related by the fact that they have the same name and ___________.
floating-point
type
token
int values
10. The process of determining if an array contains a particular key value is called _________ the array.
Closing brace
searching
new line
*
11. A filestream variable that represents the default output device
globals
cout
&
special symbols
12. A __________ should be used to declare the size of an array because it makes the program more scalable.
recursive
constant variable
int values
pointer
13. A sequence of operands and operators that describe a calculation to be performed
switch
overloading
register
arithmetic expression
14. newline
n
<<
.cpp
assignment statement
15. The only integer that can be assigned directly to a pointer is_____________.
function scope
void pointer
function prototype
0
16. Operator with only one operand
unary operator
linker
pointer
strcmp()
17. The _________ begins the body of every function and the _________ ends the body of every function.
before
{ }
definition
&
18. 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
token
fixed
vectors
19. 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.
information hiding
heap
overloading
mixed expression
20. The __________ operator reclaims memory previously allocated by new.
delete
opened
access specifier
?
21. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
sorting
char
access specifier
continue
22. Used to qualify hidden names so that they can be used.
scope resolution operator
opened
Preprocessor
delete
23. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
address
function overloading
variable
overloading
24. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
void
fstream
getline
cin >> variable
25. To allow file access in a program you must #include this header file.
setw
Arithmetic Operators
fstream
global
26. An array that uses two subscripts is referred to as a(n) _________ array.
two-dimensional
type casting (conversion)
Preprocessor
selection
27. All ______ must be declared before they are used.
setw
const datatype identifier = value
variables
local variable
28. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
variable
function prototype
object file
setw
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.
classes
selection
inheritance
vectors
30. A C++ statement that makes a decision is ______.
if
register
inline functions
unary scope resolution operator (::)
31. Used for function calls and local variables
stack
unary operator
named constant
globals
32. Default name of executable file
classes
function parameters
a.out
register
33. = & | are examples of ____________.
data type
subscript (or index)
getline
special symbols
34. The sign you use for references
beginning
object file
&
private
35. The sign you use for pointers
*
operator overloading
return
constant variable
36. Allows the programmer to store a value in a variable
base class
beginning
assignment statement
return
37. Grammar rules of the language; compiler will try to identify and locate syntax errors
syntax
overloading
like-type expression
information hiding
38. The ________ program combines the output of the compiler with various library functions to produce an executable image.
friend
object-oriented analysis and design (OOAD)
.cpp
linker
39. These are data items whose values do not change while the program is running
recursive function
preprocessor
editor
Literals
40. In inheritance the ____________ is the class the receives the inherited members.
associations
identifiers
derived class
static_cast<char>(65)
41. Returns the length of a string excluding the null terminator.
data type
function scope
#include directive
strlen()
42. * / % + -
Arithmetic Operators
assignment
linker
searching
43. Initializers __________ must be used to initialize constant members of a class.
main
template
unary operator
member
44. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
editor
function overloading
Default memberwise assignment
special symbols
45. This manipulator causes the field to be left-justified with padding spaces printed to the right.
cin.get(ch)
syntax
left
strcpy()
46. A function is invoked with a ________.
NULL
function call
{ }
selection
47. Characters used to separate symbols or reserved words or identifiers and statements
function call
getline
whitespace
before
48. A function that can be used to read character data including whitespace
% modulus
cin.get(ch)
beginning
function parameters
49. A set of values together with a set of operations
special symbols
Literals
unary operator
data type
50. The ________ of an identifier is the portion of the program in which the identifier can be used.
a.out
scope
operand value
local variable