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 either directly or indirectly - through another function) - is a ________ function.
recursive
0
access specifier
auto
2. Keyword public is a(n) _________
const
recursive function
access specifier
type coercion
3. 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.
type casting (conversion)
void pointer
t
virtual functions
4. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
::
cin >> variable
a.out
operator
5. When a value of one data type is implicitly (automatically) changed to another data type
derived class
void
initialized
type coercion
6. Class members specified as _________ are accessible anywhere an object of the class is in scope.
delete
public
default constructor
semantics
7. The process of determining if an array contains a particular key value is called _________ the array.
searching
new line
Sentinel
*
8. The three values that can be used to initialize a pointer are 0 - __________ and an address.
public
Default memberwise assignment
NULL
function parameters
9. newline
n
&
//
attributes
10. directive A statement that starts with a # is called a ____________.
Preprocessor
NULL
polymorphism
strcmp()
11. Characters used to separate symbols or reserved words or identifiers and statements
Preprocessor
whitespace
strcpy()
cin >> variable
12. An expression that has operands with different data types
definition
function overloading
mixed expression
fixed
13. Nonexecutable statements that are included in a program to provide information about what the program does etc.
comments
static_cast<char>(65)
Arithmetic Operators
editor
14. The __________ operator reclaims memory previously allocated by new.
token
function call
delete
source file
15. The size & shape & color and weight of an object are considered
source file
member
attributes
const datatype identifier = value
16. In inheritance the ____________ is the class the receives the inherited members.
derived class
like-type expression
auto
subscript (or index)
17. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
function scope
heap
function prototype
information hiding
18. Header file that contains commonly performed mathematical functions
setw
default constructor
static
cmath
19. This manipulator is used to establish a field width for the value immediately following it.
setw
fixed
editor
register
20. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
Stack overflow
scope resolution operator
//
Closing brace
21. A file must be ________ before data can be written to or read from it.
local variable
opened
two-dimensional
semantics
22. A variable that is known only within the function in which it is defined is called a ________.
local variable
searching
cmath
identifiers
23. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
dot (.)
void
const
non-static
24. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
address
return
Semicolon
semantics
25. You must have a ___________ for every variable you intend to use in a program
definition
case sensitive
semicolon
Semicolon
26. The process of placing the elements of an array in order is called ________ the array.
sorting
floating-point
Literals
const
27. Two slash marks ( // ) indicate __________ of a comment
scope resolution operator
NULL
beginning
opened
28. data types that refer to numbers with decimals
prompt
comments
default constructor
floating-point
29. Allows the programmer to store a value in a variable
void pointer
assignment statement
constant variable
unary scope resolution operator (::)
30. The elements of an array are related by the fact that they have the same name and ___________.
type
function call
associations
//
31. This manipulator causes the field to be left-justified with padding spaces printed to the right.
Sentinel
base
auto
left
32. Initializers __________ must be used to initialize constant members of a class.
member
#include directive
.cpp
delete
33. The ________ qualifier is used to declare read-only variables.
local variable
rand
const
information hiding
34. Forces the computer to display decimal point and trailing zeroes
Semicolon
non-static
Counter-controlled or definite
showpoint
35. A __________ should be used to declare the size of an array because it makes the program more scalable.
constant variable
semicolon
register
scope resolution operator
36. A __________ data member represents class-wide information.
static
/n
comments
mixed expression
37. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
variable
register
&
if...else
38. To explicitly indicate that a value is to be converted to another type
n
case sensitive
>>
type casting (conversion)
39. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
switch
public
escape sequences
showpoint
40. A filestream variable that represents the default output device
cout
function scope
type
data type
41. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
/n
function prototype
if...else
base
42. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
binary operator
{ }
friend
n
43. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
getline
beginning
//
public
44. A function is invoked with a ________.
comments
cin >> variable
Semicolon
function call
45. A function that calls itself
function parameters
loader
before
recursive function
46. Words that are used for special purposes in a program
default constructor
reserved words
template
fixed
47. A variable that holds the address of another variable.
syntax
cin
switch
pointer
48. The number used to refer to a particular element of an array is called its ________.
subscript (or index)
function prototype
<<
return
49. C++ programs are normally typed into a computer using a(n) ________ program.
.cpp
editor
unary operator
polymorphism
50. The process of analyzing and designing a system from an object-oriented point of view is called ________.
delete
assignment
allocating memory
object-oriented analysis and design (OOAD)