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 __________ operator reclaims memory previously allocated by new.
type coercion
linker
delete
vectors
2. The address-of operator. it is used to assign pointers and to print the address of variables.
return
rand
dot (.)
&
3. A function is invoked with a ________.
Closing brace
function call
member
{ }
4. A pointer is a variable that contains as its value the____________ of another variable.
address
identifiers
template
heap
5. The ________ enables access to a global variable with the same name as a variable in the current scope.
unary scope resolution operator (::)
globals
searching
NULL
6. Classes can have relationships with other classes. These relationships are called ________.
associations
*
void pointer
fixed
7. All C++ Variables are_________.
fstream
getline
case sensitive
syntax
8. A variable that holds the address of another variable.
n
linker
unary scope resolution operator (::)
pointer
9. Repeating a set of instructions a specific number of times is called_________repetition.
assignment
classes
Counter-controlled or definite
editor
10. Operator with only one operand
break
unary operator
.cpp
<<
11. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
like-type expression
variable
overloading
loader
12. Used for function calls and local variables
template
const datatype identifier = value
new line
stack
13. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
/n
constant variable
switch
endl (same as 'n')
14. Use 2 characters to represent one
unary scope resolution operator (::)
char
escape sequences
information hiding
15. A C++ statement that makes a decision is ______.
% modulus
identifiers
inheritance
if
16. The number used to refer to a particular element of an array is called its ________.
Unified Modeling Language(UML)
Sentinel
const datatype identifier = value
subscript (or index)
17. The sign you use for pointers
function overloading
Semicolon
strcmp()
*
18. A memory location with a name and data type - its content may be changed during program execution
variable
srand
showpoint
left
19. tab
special symbols
Stack overflow
t
editor
20. Message displayed to the screen asking user for input; generated with an output statement
friend
classes
prompt
beginning
21. The ________ statement in a called function passes the value of an expression back to the calling function.
rand
return
cout
>>
22. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
heap
void pointer
classes
Semicolon
23. Member objects are constructed __________ their enclosing class object.
searching
before
Counter-controlled or definite
allocating memory
24. int namespace include using return examples of ___________
return
reserve words
operator
object file
25. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
/n
function overloading
linker
break
26. The storage-class specifiers are mutable - auto - ________ - extern and static.
register
/n
cin
% modulus
27. Lists and tables of values can be stored in arrays or __________.
scope
vectors
void
fixed
28. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
heap
Unified Modeling Language(UML)
pointer
#include <headerfilename>
29. Words that are used for special purposes in a program
register
derived class
showpoint
reserved words
30. A filestream variable that represents the default input source
::
cin
Literals
>>
31. The _________ begins the body of every function and the _________ ends the body of every function.
{ }
address
*
floating-point
32. Function ________ is used to produce random numbers.
public
cmath
rand
if...else
33. In inheritance the ____________ is the class the receives the inherited members.
derived class
unary scope resolution operator (::)
pointer
default constructor
34. A file must be ________ before data can be written to or read from it.
{ }
break
opened
cout
35. For every opening brace in a C++ program there must be a ______________.
*
return
Closing brace
globals
36. Two slash marks ( // ) indicate __________ of a comment
beginning
operator overloading
delete
endl (same as 'n')
37. * / % + -
{ }
Arithmetic Operators
beginning
int values
38. 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
friend
Default memberwise assignment
39. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
new line
scope
globals
fixed
40. Names of things that are used in a program - can apply to variables & constants and functions
if...else
continue
identifiers
int values
41. A member function should be declared static if it does not access __________ class members.
linker
non-static
break
object-oriented analysis and design (OOAD)
42. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
named constant
sorting
main
function overloading
43. The conditional operator. it evaluates a line of code and returns one thing if the condition is true and a different thing if the condition is false.
?
pointer
preprocessor
break
44. You must have a ___________ for every variable you intend to use in a program
preprocessor
return
definition
information hiding
45. A function that can be used to read character data including whitespace
cin.get(ch)
static
searching
&
46. A variable that is known only within the function in which it is defined is called a ________.
type casting (conversion)
local variable
&
rand
47. Operator with two operands
binary operator
% modulus
selection
two-dimensional
48. A __________ data member represents class-wide information.
static
object file
Counter-controlled or definite
local variable
49. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
arithmetic expression
access specifier
definition
function scope
50. Default name of executable file
a.out
cin
private
member