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. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
object file
operand value
this
operator overloading
2. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
opened
t
const
strcpy()
3. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
#include
information hiding
reserve words
globals
4. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
semantics
static
preprocessor
case sensitive
5. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
mixed expression
{ }
source file
new line
6. C++ programs are normally typed into a computer using a(n) ________ program.
public
preprocessor
fstream
editor
7. Returns the length of a string excluding the null terminator.
strcpy()
friend
&
strlen()
8. Default name of executable file
a.out
Default memberwise assignment
constant variable
default constructor
9. The _________ begins the body of every function and the _________ ends the body of every function.
strcpy()
semicolon
strcmp()
{ }
10. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
static
inline functions
#include
recursive
11. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
linker
const
function overloading
stack
12. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
friend
const
scope resolution operator
like-type expression
13. A ________ program executes before the compiler's translation phase begins.
preprocessor
source file
mixed expression
inline functions
14. To write data to a file you define an object of which one of the following
fixed
source file
ofstream
selection
15. 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)
opened
break
semicolon
16. Associate an identifier with a memory location
heap
allocating memory
void pointer
recursive
17. Lists and tables of values can be stored in arrays or __________.
dot (.)
static_cast<char>(65)
Semicolon
vectors
18. The number used to refer to a particular element of an array is called its ________.
if...else
escape sequences
subscript (or index)
floating-point
19. Used to qualify hidden names so that they can be used.
operator overloading
preprocessor
object file
scope resolution operator
20. The stream extraction operator
return
case sensitive
Default memberwise assignment
>>
21. The process of placing the elements of an array in order is called ________ the array.
static
main
sorting
template
22. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
Unified Modeling Language(UML)
srand
selection
information hiding
23. The process of determining if an array contains a particular key value is called _________ the array.
if
semicolon
searching
0
24. A pointer is a variable that contains as its value the____________ of another variable.
address
classes
opened
Arithmetic Operators
25. Preprocessor directive syntax
Unified Modeling Language(UML)
data type
#include <headerfilename>
function parameters
26. Identifier or expression that is part of the calculation to be performed
operand value
non-static
const
template
27. If a member initializer is not provided for a member object of a class the object's __________ is called.
getline
base class
stack
default constructor
28. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
loader
recursive
const datatype identifier = value
#include <headerfilename>
29. The ________ qualifier is used to declare read-only variables.
#include <headerfilename>
syntax
const
auto
30. The _____ causes the contents of another file to be inserted into a program.
source file
Unified Modeling Language(UML)
linker
#include directive
31. Naming convention for C++ programs
type casting (conversion)
.cpp
strlen()
classes
32. The ________ program combines the output of the compiler with various library functions to produce an executable image.
default constructor
linker
floating-point
public
33. = & | are examples of ____________.
special symbols
*
address
binary operator
34. The stream insertion operator
?
<<
::
&
35. To explicitly indicate that a value is to be converted to another type
variable
globals
type casting (conversion)
data type
36. A file must be ________ before data can be written to or read from it.
prompt
opened
access specifier
cin.get(ch)
37. The ________ statement in a called function passes the value of an expression back to the calling function.
const
return
type
address
38. The idea that you can call the same function and the output will depend on the type of object you're using.
linker
cin.get(ch)
polymorphism
strlen()
39. A function is invoked with a ________.
void
preprocessor
function call
semantics
40. Whole numbers - no decimals and no commas included
Unified Modeling Language(UML)
int values
showpoint
NULL
41. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
case sensitive
base class
this
editor
42. The __________ operator reclaims memory previously allocated by new.
&
delete
NULL
return
43. To allow file access in a program you must #include this header file.
semantics
fstream
public
void
44. A function that can be used to read character data including whitespace
cin.get(ch)
cmath
strcmp()
Unified Modeling Language(UML)
45. An array that uses two subscripts is referred to as a(n) _________ array.
unary operator
#include
two-dimensional
classes
46. A function that calls itself
whitespace
recursive function
&
static
47. Operator with two operands
binary operator
void pointer
pointer
cin
48. Member objects are constructed __________ their enclosing class object.
arithmetic expression
pointer
before
//
49. The ________ of an identifier is the portion of the program in which the identifier can be used.
like-type expression
Arithmetic Operators
scope
non-static
50. data types that refer to numbers with decimals
floating-point
void
scope
static