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. Names of things that are used in a program - can apply to variables & constants and functions
identifiers
setw
polymorphism
delete
2. A constant object must be __________; it cannot be modified after it is created.
access specifier
escape sequences
NULL
initialized
3. You can declare default values for a function in the ____________________.
function parameters
information hiding
fstream
cmath
4. newline
t
semantics
n
editor
5. When you create a ___________________in the base class and then call it using an object the function will know to look in the inherited class for the specifics of that function.
new line
Preprocessor
virtual functions
before
6. The stream extraction operator
>>
type coercion
{ }
fixed
7. A function that can be used to read character data including whitespace
cin.get(ch)
fstream
globals
n
8. Compares two strings and returns 0 if they are equal.
type casting (conversion)
public
strcmp()
void
9. A ________ program executes before the compiler's translation phase begins.
preprocessor
//
cmath
#include
10. To allow file access in a program you must #include this header file.
fstream
operator
base class
attributes
11. A function is invoked with a ________.
binary operator
Unified Modeling Language(UML)
pointer
function call
12. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
type
const datatype identifier = value
local variable
pointer
13. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
prompt
token
left
void
14. Function ________ is used to produce random numbers.
left
rand
subscript (or index)
strcmp()
15. You must have a ___________ for every variable you intend to use in a program
definition
unary operator
subscript (or index)
globals
16. 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
register
token
ofstream
17. Message displayed to the screen asking user for input; generated with an output statement
prompt
&
local variable
selection
18. Every C++ statement ends with a(n) _________.
semicolon
Sentinel
&
{ }
19. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
Stack overflow
function prototype
definition
integer operands
20. The storage-class specifiers are mutable - auto - ________ - extern and static.
0
recursive function
pointer
register
21. An array that uses two subscripts is referred to as a(n) _________ array.
two-dimensional
operator
register
identifiers
22. The idea that you can call the same function and the output will depend on the type of object you're using.
strlen()
endl (same as 'n')
Literals
polymorphism
23. int namespace include using return examples of ___________
case sensitive
<<
Literals
reserve words
24. The ________ program combines the output of the compiler with various library functions to produce an executable image.
semantics
linker
strcmp()
loader
25. A program that finds and attaches to your program the indicated libraries for compilation
function scope
definition
static
preprocessor
26. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
operator overloading
special symbols
Arithmetic Operators
fstream
27. A member function should be declared static if it does not access __________ class members.
named constant
fixed
function overloading
non-static
28. All C++ Variables are_________.
0
case sensitive
*
selection
29. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
overloading
assignment
new line
int values
30. data types that refer to numbers with decimals
floating-point
base
*
&
31. A file must be ________ before data can be written to or read from it.
default constructor
subscript (or index)
opened
char
32. In inheritance the ____________ is the class that supplies the inherited members.
variable
base class
arithmetic expression
pointer
33. Symbol that denotes an action to be performed
binary operator
operator
type casting (conversion)
default constructor
34. Used for dynamically allocated variables
object-oriented analysis and design (OOAD)
unary operator
heap
information hiding
35. 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
base
integer operands
escape sequences
new line
36. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
switch
like-type expression
auto
new line
37. Lists and tables of values can be stored in arrays or __________.
vectors
reserved words
const datatype identifier = value
operator overloading
38. This is used to mark the end of a complete C++ programming statement.
srand
Counter-controlled or definite
function call
Semicolon
39. tab
virtual functions
t
return
two-dimensional
40. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
delete
type coercion
globals
::
41. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
return
getline
whitespace
escape sequences
42. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
cin >> variable
vectors
unary scope resolution operator (::)
token
43. Identifier or expression that is part of the calculation to be performed
scope resolution operator
type coercion
operand value
constant variable
44. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
default constructor
function overloading
showpoint
{ }
45. Repeating a set of instructions a specific number of times is called_________repetition.
void
initialized
function overloading
Counter-controlled or definite
46. Used to qualify hidden names so that they can be used.
scope resolution operator
inline functions
Literals
reserved words
47. * / % + -
return
Arithmetic Operators
virtual functions
function call
48. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
stack
void
return
source file
49. Most calculations are normally performed by ______ statements.
assignment
function overloading
comments
type
50. A variable declared outside any block or function is a ________ variable.
address
global
return
vectors