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 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
binary operator
globals
base
floating-point
2. Default name of executable file
a.out
object file
*
beginning
3. The __________ operator reclaims memory previously allocated by new.
named constant
subscript (or index)
auto
delete
4. Allows the programmer to store a value in a variable
vectors
break
>>
assignment statement
5. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
editor
continue
comments
this
6. If a member initializer is not provided for a member object of a class the object's __________ is called.
const
virtual functions
default constructor
fstream
7. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
Sentinel
pointer
function scope
operand value
8. A function that can be used to read character data including whitespace
cin.get(ch)
operand value
base
constant variable
9. Operator with only one operand
unary operator
mixed expression
static
beginning
10. Message displayed to the screen asking user for input; generated with an output statement
classes
&
Preprocessor
prompt
11. A __________ should be used to declare the size of an array because it makes the program more scalable.
heap
Preprocessor
ofstream
constant variable
12. The three values that can be used to initialize a pointer are 0 - __________ and an address.
searching
NULL
new line
cmath
13. All ______ must be declared before they are used.
void
globals
getline
variables
14. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
Literals
token
showpoint
getline
15. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
information hiding
pointer
variable
static_cast<char>(65)
16. Used for dynamically allocated variables
t
{ }
heap
global
17. This manipulator is used to establish a field width for the value immediately following it.
attributes
two-dimensional
#include
setw
18. The stream extraction operator
>>
like-type expression
register
subscript (or index)
19. = & | are examples of ____________.
special symbols
this
#include directive
editor
20. The symbol for the binary scope resolution operator
::
sorting
object-oriented analysis and design (OOAD)
ofstream
21. The size & shape & color and weight of an object are considered
attributes
main
address
source file
22. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
fixed
classes
default constructor
const datatype identifier = value
23. Identifier or expression that is part of the calculation to be performed
Counter-controlled or definite
operand value
Unified Modeling Language(UML)
Preprocessor
24. To explicitly indicate that a value is to be converted to another type
fstream
Counter-controlled or definite
type casting (conversion)
showpoint
25. A constant object must be __________; it cannot be modified after it is created.
preprocessor
continue
variables
initialized
26. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
function overloading
case sensitive
NULL
return
27. Lists and tables of values can be stored in arrays or __________.
operator
Literals
endl (same as 'n')
vectors
28. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
stack
token
auto
Semicolon
29. A function ________ enables a single function to be defined to perform a task on many different data types.
address
default constructor
static_cast<char>(65)
template
30. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
#include <headerfilename>
auto
strlen()
break
31. directive A statement that starts with a # is called a ____________.
information hiding
searching
allocating memory
Preprocessor
32. Two slash marks ( // ) indicate __________ of a comment
preprocessor
type
beginning
?
33. Words that are used for special purposes in a program
variables
vectors
definition
reserved words
34. Executable version of program
object file
cmath
static_cast<char>(65)
stack
35. Used to qualify hidden names so that they can be used.
&
scope resolution operator
cin
void
36. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
public
recursive
attributes
two-dimensional
37. The ________ program transfers the executable image of a C++ program from disk to memory.
escape sequences
const
editor
loader
38. The number used to refer to a particular element of an array is called its ________.
assignment
static_cast<char>(65)
n
subscript (or index)
39. A filestream variable that represents the default input source
void
strcpy()
function scope
cin
40. Used for function calls and local variables
stack
type coercion
int values
heap
41. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
operator overloading
return
named constant
attributes
42. When a value of one data type is implicitly (automatically) changed to another data type
Unified Modeling Language(UML)
vectors
type coercion
base
43. The keyword ________ is used in a function header to indicate that a function does not return a value or to indicate that a function contains no parameters.
subscript (or index)
if
void
NULL
44. The escape sequence ___ when output with cout and the stream insertion operator - causes the cursor to position to the beginning of the next line on the screen.
/n
stack
two-dimensional
preprocessor
45. The process of analyzing and designing a system from an object-oriented point of view is called ________.
pointer
cin.get(ch)
object-oriented analysis and design (OOAD)
<<
46. The modulus operator (%) can be used only with __________.
integer operands
stack
this
sorting
47. A variable that is known only within the function in which it is defined is called a ________.
local variable
beginning
char
variables
48. Keyword public is a(n) _________
identifiers
#include directive
prompt
access specifier
49. data types that refer to numbers with decimals
showpoint
floating-point
base
type coercion
50. An expression in which all operands have the same data type - result will have the same data type as operands
cout
like-type expression
Stack overflow
binary operator