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 sign you use for references
base class
&
subscript (or index)
loader
2. A type of pointer that can point at objects of any data type.
Stack overflow
delete
void pointer
template
3. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
subscript (or index)
0
break
data type
4. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
Semicolon
t
new line
.cpp
5. You can declare default values for a function in the ____________________.
before
function parameters
friend
pointer
6. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
if...else
<<
operator overloading
classes
7. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
switch
function call
type
type casting (conversion)
8. 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.
information hiding
dot (.)
a.out
classes
9. Program components in C++ are called functions and ________.
*
classes
like-type expression
strcmp()
10. 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.
inheritance
recursive function
object file
void
11. The idea that you can call the same function and the output will depend on the type of object you're using.
linker
srand
polymorphism
const datatype identifier = value
12. All C++ Variables are_________.
case sensitive
syntax
switch
const
13. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
object file
attributes
unary scope resolution operator (::)
function scope
14. A filestream variable that represents the default input source
like-type expression
void pointer
Literals
cin
15. Sets floating-point values to a fixed decimal format
this
associations
fixed
preprocessor
16. The size & shape & color and weight of an object are considered
overloading
attributes
dot (.)
unary operator
17. Compares two strings and returns 0 if they are equal.
this
loader
strcmp()
switch
18. A filestream variable that represents the default output device
case sensitive
cout
void
base
19. Returns the length of a string excluding the null terminator.
unary operator
fstream
Counter-controlled or definite
strlen()
20. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
&
default constructor
friend
inheritance
21. The __________ operator reclaims memory previously allocated by new.
static
delete
data type
rand
22. A __________ data member represents class-wide information.
static
variables
classes
assignment statement
23. The ________ qualifier is used to declare read-only variables.
const
Default memberwise assignment
void pointer
function parameters
24. 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.
editor
address
virtual functions
#include directive
25. Allows the programmer to store a value in a variable
assignment statement
like-type expression
cin
endl (same as 'n')
26. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
base class
register
inline functions
const
27. The ________ enables access to a global variable with the same name as a variable in the current scope.
reserve words
{ }
unary scope resolution operator (::)
register
28. An array that uses two subscripts is referred to as a(n) _________ array.
cmath
two-dimensional
this
type
29. These are data items whose values do not change while the program is running
function scope
Literals
function parameters
cout
30. A ________ program executes before the compiler's translation phase begins.
default constructor
preprocessor
<<
operator overloading
31. Creates a copy of a string.
special symbols
Closing brace
strcpy()
inline functions
32. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
private
static
preprocessor
recursive function
33. Member objects are constructed __________ their enclosing class object.
selection
before
>>
register
34. Used for function calls and local variables
strlen()
recursive function
function call
stack
35. The ________ of an identifier is the portion of the program in which the identifier can be used.
member
public
const datatype identifier = value
scope
36. A sequence of operands and operators that describe a calculation to be performed
arithmetic expression
Semicolon
local variable
int values
37. A pointer is a variable that contains as its value the____________ of another variable.
Default memberwise assignment
operator overloading
public
address
38. 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.
template
continue
mixed expression
NULL
39. Whole numbers - no decimals and no commas included
heap
int values
floating-point
before
40. A function ________ enables a single function to be defined to perform a task on many different data types.
Arithmetic Operators
data type
template
break
41. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
static
Closing brace
Stack overflow
function overloading
42. Grammar rules of the language; compiler will try to identify and locate syntax errors
endl (same as 'n')
dot (.)
comments
syntax
43. A variable that holds the address of another variable.
reserve words
pointer
left
cin >> variable
44. Two slash marks ( // ) indicate __________ of a comment
NULL
beginning
before
0
45. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
static_cast<char>(65)
#include
0
auto
46. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
static
globals
void
variables
47. The modulus operator (%) can be used only with __________.
assignment
::
integer operands
showpoint
48. A human readable file that contains C++ program
static_cast<char>(65)
type coercion
static
source file
49. newline
n
subscript (or index)
&
sorting
50. Words that are used for special purposes in a program
linker
reserved words
escape sequences
integer operands