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. The __________ operator reclaims memory previously allocated by new.
syntax
/n
preprocessor
delete
2. An array that uses two subscripts is referred to as a(n) _________ array.
beginning
two-dimensional
constant variable
NULL
3. Every C++ program begins execution at the function _________.
arithmetic expression
main
subscript (or index)
#include
4. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
unary scope resolution operator (::)
break
preprocessor
operator overloading
5. Preprocessor directive syntax
void pointer
strcpy()
associations
#include <headerfilename>
6. The ________ program transfers the executable image of a C++ program from disk to memory.
two-dimensional
access specifier
loader
before
7. Keyword public is a(n) _________
const datatype identifier = value
object-oriented analysis and design (OOAD)
fixed
access specifier
8. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
::
function scope
escape sequences
pointer
9. The process of determining if an array contains a particular key value is called _________ the array.
access specifier
char
searching
polymorphism
10. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
this
special symbols
switch
Counter-controlled or definite
11. The symbol for the binary scope resolution operator
::
opened
void
fstream
12. In inheritance the ____________ is the class the receives the inherited members.
beginning
derived class
subscript (or index)
setw
13. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
0
const
globals
arithmetic expression
14. The _____ causes the contents of another file to be inserted into a program.
assignment statement
base class
object-oriented analysis and design (OOAD)
#include directive
15. A variable declared outside any block or function is a ________ variable.
scope resolution operator
#include
function parameters
global
16. An operator that can only be used with int values. result will always be an int.
% modulus
identifiers
binary operator
data type
17. You must have a ___________ for every variable you intend to use in a program
NULL
global
overloading
definition
18. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
Unified Modeling Language(UML)
operator
register
this
19. Causes the program to immediately goes back to the top of the loop. the remainder of the statements in the loop are ignored for this current iteration.
overloading
this
scope resolution operator
continue
20. Use 2 characters to represent one
recursive function
address
escape sequences
ofstream
21. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
identifiers
semantics
register
editor
22. When it is not known in advance how many times a set of statements will be repeated a _________value can be used to terminate the repetition.
new line
#include directive
pointer
Sentinel
23. 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
global
syntax
base
allocating memory
24. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
//
derived class
classes
Unified Modeling Language(UML)
25. To explicitly indicate that a value is to be converted to another type
register
dot (.)
type casting (conversion)
template
26. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
#include directive
private
unary scope resolution operator (::)
function overloading
27. To write data to a file you define an object of which one of the following
ofstream
virtual functions
special symbols
editor
28. To allow file access in a program you must #include this header file.
Counter-controlled or definite
fstream
default constructor
register
29. Program components in C++ are called functions and ________.
fstream
linker
classes
reserve words
30. The stream insertion operator
<<
semantics
definition
return
31. Message displayed to the screen asking user for input; generated with an output statement
prompt
assignment statement
cin >> variable
member
32. int namespace include using return examples of ___________
t
reserve words
return
switch
33. An expression that has operands with different data types
type casting (conversion)
mixed expression
polymorphism
editor
34. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
Unified Modeling Language(UML)
type
base
Stack overflow
35. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
Unified Modeling Language(UML)
global
type casting (conversion)
break
36. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
classes
identifiers
0
new line
37. 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.
virtual functions
t
stack
before
38. In inheritance the ____________ is the class that supplies the inherited members.
base class
char
return
Literals
39. Function ________ is used to set the random number seed to randomize a program.
syntax
before
srand
variable
40. data types that refer to numbers with decimals
a.out
strlen()
vectors
floating-point
41. Initializers __________ must be used to initialize constant members of a class.
preprocessor
member
pointer
fstream
42. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
register
*
n
getline
43. tab
&
?
heap
t
44. This is used to mark the end of a complete C++ programming statement.
overloading
private
beginning
Semicolon
45. 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.
0
semantics
linker
inheritance
46. A function ________ enables a single function to be defined to perform a task on many different data types.
assignment statement
#include
template
cmath
47. Executable version of program
object file
setw
opened
/n
48. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
n
return
Stack overflow
type
49. Creates a copy of a string.
strcpy()
if
pointer
function call
50. Returns the length of a string excluding the null terminator.
strlen()
new line
operand value
associations