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 symbol for the binary scope resolution operator
::
const
if
&
2. This manipulator causes the field to be left-justified with padding spaces printed to the right.
Arithmetic Operators
left
{ }
#include <headerfilename>
3. tab
register
t
Default memberwise assignment
template
4. If a member initializer is not provided for a member object of a class the object's __________ is called.
operator
default constructor
&
auto
5. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
private
static_cast<char>(65)
switch
public
6. Words that are used for special purposes in a program
two-dimensional
reserved words
virtual functions
integer operands
7. 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
stack
Arithmetic Operators
fixed
8. Use 2 characters to represent one
escape sequences
assignment
before
stack
9. Allows the programmer to store a value in a variable
base
template
Closing brace
assignment statement
10. The ________ program combines the output of the compiler with various library functions to produce an executable image.
operand value
linker
token
escape sequences
11. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
showpoint
searching
const
unary scope resolution operator (::)
12. 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.
loader
token
globals
Sentinel
13. The sign you use for pointers
Counter-controlled or definite
*
classes
switch
14. Nonexecutable statements that are included in a program to provide information about what the program does etc.
unary operator
showpoint
?
comments
15. Most calculations are normally performed by ______ statements.
getline
non-static
assignment
inline functions
16. A set of values together with a set of operations
dot (.)
Stack overflow
delete
data type
17. 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.
identifiers
&
dot (.)
escape sequences
18. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
break
const
getline
n
19. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
Stack overflow
#include directive
variable
strlen()
20. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
auto
inline functions
attributes
#include <headerfilename>
21. For every opening brace in a C++ program there must be a ______________.
Closing brace
fstream
register
endl (same as 'n')
22. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
named constant
return
ofstream
void pointer
23. The sign you use for references
identifiers
&
auto
int values
24. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
pointer
cmath
this
special symbols
25. The ________ enables access to a global variable with the same name as a variable in the current scope.
stack
attributes
local variable
unary scope resolution operator (::)
26. A ________ program executes before the compiler's translation phase begins.
case sensitive
preprocessor
constant variable
n
27. Header file that contains commonly performed mathematical functions
Preprocessor
cmath
dot (.)
&
28. To explicitly indicate that a value is to be converted to another type
address
type casting (conversion)
Counter-controlled or definite
private
29. The _____ causes the contents of another file to be inserted into a program.
reserve words
cin
scope
#include directive
30. Operator with only one operand
variable
unary operator
rand
register
31. A function that calls itself
two-dimensional
rand
recursive function
variables
32. A __________ data member represents class-wide information.
strcpy()
Literals
static
return
33. A variable that is known only within the function in which it is defined is called a ________.
Closing brace
const datatype identifier = value
Arithmetic Operators
local variable
34. Symbol that denotes an action to be performed
dot (.)
operator
linker
function parameters
35. A file must be ________ before data can be written to or read from it.
const datatype identifier = value
whitespace
heap
opened
36. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
pointer
cmath
allocating memory
switch
37. Every C++ statement ends with a(n) _________.
semicolon
Arithmetic Operators
Unified Modeling Language(UML)
a.out
38. You can declare default values for a function in the ____________________.
function overloading
vectors
function parameters
binary operator
39. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
ofstream
loader
function scope
new line
40. A variable that holds the address of another variable.
pointer
{ }
default constructor
#include
41. = & | are examples of ____________.
special symbols
public
<<
sorting
42. The ________ qualifier is used to declare read-only variables.
a.out
mixed expression
const
scope resolution operator
43. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
public
Preprocessor
*
function prototype
44. The __________ operator reclaims memory previously allocated by new.
delete
editor
allocating memory
loader
45. All ______ must be declared before they are used.
semicolon
variables
#include directive
register
46. These are data items whose values do not change while the program is running
Literals
::
fstream
associations
47. A filestream variable that represents the default input source
unary operator
cin
constant variable
setw
48. Operator with two operands
void pointer
if
token
binary operator
49. Two slash marks ( // ) indicate __________ of a comment
beginning
function prototype
left
int values
50. A sequence of operands and operators that describe a calculation to be performed
arithmetic expression
mixed expression
token
if