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
NULL
overloading
preprocessor
recursive function
2. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
getline
t
endl (same as 'n')
searching
3. Preprocessor directive syntax
operator overloading
case sensitive
register
#include <headerfilename>
4. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
subscript (or index)
if...else
fixed
return
5. The size & shape & color and weight of an object are considered
attributes
member
data type
delete
6. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
overloading
friend
allocating memory
left
7. The number used to refer to a particular element of an array is called its ________.
endl (same as 'n')
subscript (or index)
ofstream
char
8. A C++ statement that makes a decision is ______.
if
getline
escape sequences
Closing brace
9. The sign you use for references
break
static
object file
&
10. Message displayed to the screen asking user for input; generated with an output statement
left
editor
const
prompt
11. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
globals
continue
main
switch
12. If a member initializer is not provided for a member object of a class the object's __________ is called.
default constructor
loader
.cpp
&
13. Use 2 characters to represent one
escape sequences
function prototype
Unified Modeling Language(UML)
named constant
14. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
like-type expression
type coercion
t
void
15. The ________ program combines the output of the compiler with various library functions to produce an executable image.
opened
linker
n
two-dimensional
16. Operator with two operands
binary operator
globals
n
heap
17. Identifier or expression that is part of the calculation to be performed
setw
operand value
ofstream
register
18. Most calculations are normally performed by ______ statements.
sorting
before
assignment
public
19. Class members are accessed via the ________ operator in conjunction with the name of an object (or reference to an object) of the class or via the arrow (->) operator in conjunction with a pointer to an object of the class.
.cpp
reserve words
dot (.)
Closing brace
20. * / % + -
Arithmetic Operators
?
attributes
loader
21. Executable version of program
object file
Sentinel
fstream
constant variable
22. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
operator overloading
break
Preprocessor
non-static
23. In inheritance the ____________ is the class that supplies the inherited members.
beginning
Default memberwise assignment
base class
strcmp()
24. A filestream variable that represents the default output device
const datatype identifier = value
cin.get(ch)
public
cout
25. Forces the computer to display decimal point and trailing zeroes
<<
assignment
base class
showpoint
26. Used to qualify hidden names so that they can be used.
scope resolution operator
.cpp
two-dimensional
base class
27. = & | are examples of ____________.
#include directive
special symbols
classes
address
28. A __________ should be used to declare the size of an array because it makes the program more scalable.
constant variable
ofstream
delete
::
29. An expression that has operands with different data types
member
mixed expression
Counter-controlled or definite
function prototype
30. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
pointer
NULL
object-oriented analysis and design (OOAD)
like-type expression
31. A memory location with a name and data type - its content may be changed during program execution
strlen()
arithmetic expression
char
variable
32. This is used to mark the end of a complete C++ programming statement.
operator
% modulus
Semicolon
register
33. __________ can be used to assign an object of a class to another object of the same class.
object file
cin.get(ch)
Default memberwise assignment
overloading
34. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
Semicolon
switch
data type
variables
35. An expression in which all operands have the same data type - result will have the same data type as operands
before
like-type expression
fixed
scope
36. A function that can be used to read character data including whitespace
cin.get(ch)
strcmp()
break
object-oriented analysis and design (OOAD)
37. Names of things that are used in a program - can apply to variables & constants and functions
identifiers
delete
like-type expression
auto
38. To write data to a file you define an object of which one of the following
t
type coercion
data type
ofstream
39. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
scope resolution operator
inline functions
virtual functions
static
40. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
escape sequences
this
private
assignment statement
41. The ________ program transfers the executable image of a C++ program from disk to memory.
#include
unary operator
a.out
loader
42. To explicitly indicate that a value is to be converted to another type
selection
type casting (conversion)
reserved words
vectors
43. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
Unified Modeling Language(UML)
function overloading
type casting (conversion)
base class
44. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
like-type expression
Stack overflow
operator overloading
sorting
45. 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
scope
scope resolution operator
information hiding
46. Initializers __________ must be used to initialize constant members of a class.
data type
#include directive
member
type coercion
47. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
this
scope
member
function overloading
48. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
char
strcmp()
cmath
srand
49. Program components in C++ are called functions and ________.
new line
default constructor
classes
named constant
50. Header file that contains commonly performed mathematical functions
assignment
main
prompt
cmath