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. Classes can have relationships with other classes. These relationships are called ________.
function parameters
special symbols
syntax
associations
2. The symbol for the binary scope resolution operator
break
operator
virtual functions
::
3. Executable version of program
before
object file
identifiers
stack
4. Syntax for named constant declaration
&
switch
function prototype
const datatype identifier = value
5. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
Sentinel
linker
friend
left
6. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
switch
inline functions
getline
unary operator
7. Used for dynamically allocated variables
heap
comments
type casting (conversion)
public
8. The ________ of an identifier is the portion of the program in which the identifier can be used.
base
member
cin >> variable
scope
9. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
switch
base class
Closing brace
function call
10. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
type casting (conversion)
recursive
binary operator
mixed expression
11. Lists and tables of values can be stored in arrays or __________.
semantics
selection
NULL
vectors
12. The three values that can be used to initialize a pointer are 0 - __________ and an address.
identifiers
NULL
overloading
dot (.)
13. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
derived class
semantics
break
#include directive
14. Identifier or expression that is part of the calculation to be performed
operand value
left
t
void
15. The __________ operator reclaims memory previously allocated by new.
left
special symbols
data type
delete
16. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
this
?
continue
object file
17. Operator with two operands
if...else
binary operator
polymorphism
ofstream
18. Grammar rules of the language; compiler will try to identify and locate syntax errors
syntax
const
function call
Literals
19. The size & shape & color and weight of an object are considered
selection
a.out
register
attributes
20. A filestream variable that represents the default output device
data type
recursive function
cin >> variable
cout
21. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
comments
initialized
named constant
stack
22. An expression that has operands with different data types
escape sequences
operator
mixed expression
object file
23. When a value of one data type is implicitly (automatically) changed to another data type
type coercion
inheritance
global
Stack overflow
24. Type casting syntax
//
static_cast<char>(65)
overloading
this
25. An expression in which all operands have the same data type - result will have the same data type as operands
Closing brace
searching
like-type expression
register
26. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
break
token
two-dimensional
special symbols
27. The stream insertion operator
variable
virtual functions
address
<<
28. To write data to a file you define an object of which one of the following
void
ofstream
showpoint
% modulus
29. The process of analyzing and designing a system from an object-oriented point of view is called ________.
whitespace
object-oriented analysis and design (OOAD)
Sentinel
setw
30. Use 2 characters to represent one
const
reserved words
escape sequences
NULL
31. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
inheritance
sorting
function scope
type coercion
32. data types that refer to numbers with decimals
char
return
recursive function
floating-point
33. 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.
{ }
escape sequences
% modulus
virtual functions
34. Member objects are constructed __________ their enclosing class object.
floating-point
linker
const datatype identifier = value
before
35. A __________ data member represents class-wide information.
setw
variable
static
inline functions
36. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
sorting
fstream
pointer
strlen()
37. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
Stack overflow
auto
srand
void
38. You must have a ___________ for every variable you intend to use in a program
definition
Semicolon
0
variable
39. To explicitly indicate that a value is to be converted to another type
pointer
type casting (conversion)
loader
virtual functions
40. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
ofstream
operator overloading
private
whitespace
41. The sign you use for pointers
identifiers
*
beginning
t
42. Whole numbers - no decimals and no commas included
function overloading
int values
auto
loader
43. The storage-class specifiers are mutable - auto - ________ - extern and static.
preprocessor
&
register
floating-point
44. Function ________ is used to set the random number seed to randomize a program.
Stack overflow
strlen()
srand
operand value
45. newline
definition
n
escape sequences
comments
46. A memory location with a name and data type - its content may be changed during program execution
strlen()
switch
unary operator
variable
47. * / % + -
syntax
two-dimensional
preprocessor
Arithmetic Operators
48. 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.
new line
semantics
.cpp
continue
49. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
inline functions
scope resolution operator
mixed expression
if...else
50. All ______ must be declared before they are used.
variables
pointer
object file
delete