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. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
member
static
strlen()
register
2. A variable that holds the address of another variable.
srand
#include directive
pointer
variables
3. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
assignment statement
semicolon
token
named constant
4. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
cin.get(ch)
default constructor
//
this
5. Used to qualify hidden names so that they can be used.
function prototype
scope resolution operator
public
setw
6. 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.
>>
const
/n
opened
7. The stream extraction operator
const
&
base
>>
8. All C++ Variables are_________.
new line
case sensitive
operator overloading
assignment
9. The process of placing the elements of an array in order is called ________ the array.
sorting
t
const datatype identifier = value
::
10. Used for dynamically allocated variables
virtual functions
comments
heap
recursive
11. The symbol for the binary scope resolution operator
reserved words
char
assignment
::
12. Header file that contains commonly performed mathematical functions
cmath
derived class
global
assignment
13. The size & shape & color and weight of an object are considered
attributes
pointer
const datatype identifier = value
unary scope resolution operator (::)
14. The address-of operator. it is used to assign pointers and to print the address of variables.
initialized
beginning
#include
&
15. Words that are used for special purposes in a program
reserved words
definition
Counter-controlled or definite
heap
16. Function ________ is used to set the random number seed to randomize a program.
0
srand
strcpy()
const
17. The ________ program transfers the executable image of a C++ program from disk to memory.
loader
selection
&
strcpy()
18. Class members specified as _________ are accessible anywhere an object of the class is in scope.
cmath
globals
const
public
19. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
auto
assignment
switch
comments
20. Symbol that denotes an action to be performed
operator
int values
globals
endl (same as 'n')
21. The ________ of an identifier is the portion of the program in which the identifier can be used.
auto
classes
scope
Counter-controlled or definite
22. Identifier or expression that is part of the calculation to be performed
>>
operand value
allocating memory
getline
23. The three values that can be used to initialize a pointer are 0 - __________ and an address.
base class
NULL
main
#include
24. A human readable file that contains C++ program
binary operator
*
source file
constant variable
25. In inheritance the ____________ is the class the receives the inherited members.
derived class
whitespace
return
inheritance
26. A __________ should be used to declare the size of an array because it makes the program more scalable.
left
Sentinel
public
constant variable
27. 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.
function call
unary operator
virtual functions
classes
28. The process of analyzing and designing a system from an object-oriented point of view is called ________.
heap
const
object-oriented analysis and design (OOAD)
syntax
29. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
function prototype
pointer
local variable
t
30. 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.
const datatype identifier = value
::
global
dot (.)
31. Compares two strings and returns 0 if they are equal.
identifiers
comments
strcmp()
if...else
32. Sets floating-point values to a fixed decimal format
scope
private
Sentinel
fixed
33. A memory location with a name and data type - its content may be changed during program execution
template
Literals
polymorphism
variable
34. Default name of executable file
.cpp
a.out
&
Default memberwise assignment
35. Nonexecutable statements that are included in a program to provide information about what the program does etc.
const
//
comments
floating-point
36. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
function call
function overloading
semicolon
token
37. Every C++ statement ends with a(n) _________.
Arithmetic Operators
member
semicolon
base
38. A type of pointer that can point at objects of any data type.
public
heap
function prototype
void pointer
39. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
variables
classes
syntax
globals
40. The ________ statement in a called function passes the value of an expression back to the calling function.
static_cast<char>(65)
ofstream
return
cin
41. The _________ begins the body of every function and the _________ ends the body of every function.
fstream
{ }
syntax
::
42. Function ________ is used to produce random numbers.
selection
non-static
Arithmetic Operators
rand
43. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
a.out
void
globals
vectors
44. A constant object must be __________; it cannot be modified after it is created.
base
initialized
inline functions
void pointer
45. The ________ qualifier is used to declare read-only variables.
const
&
assignment statement
function call
46. You can declare default values for a function in the ____________________.
function parameters
a.out
/n
>>
47. A sequence of operands and operators that describe a calculation to be performed
fixed
function call
register
arithmetic expression
48. Type casting syntax
Counter-controlled or definite
break
static_cast<char>(65)
type
49. In inheritance the ____________ is the class that supplies the inherited members.
case sensitive
Sentinel
base class
globals
50. Every C++ program begins execution at the function _________.
variables
main
unary scope resolution operator (::)
before