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. 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.
cout
like-type expression
base class
inheritance
2. A type of pointer that can point at objects of any data type.
operand value
preprocessor
void pointer
<<
3. Whole numbers - no decimals and no commas included
static
int values
const
register
4. Creates a copy of a string.
{ }
opened
two-dimensional
strcpy()
5. The ________ of an identifier is the portion of the program in which the identifier can be used.
srand
strcmp()
#include
scope
6. A constant object must be __________; it cannot be modified after it is created.
strcpy()
initialized
Literals
identifiers
7. The modulus operator (%) can be used only with __________.
syntax
a.out
integer operands
type
8. Most calculations are normally performed by ______ statements.
scope resolution operator
loader
assignment
register
9. Repeating a set of instructions a specific number of times is called_________repetition.
assignment statement
integer operands
Counter-controlled or definite
void pointer
10. The number used to refer to a particular element of an array is called its ________.
subscript (or index)
derived class
selection
assignment
11. A variable declared outside any block or function is a ________ variable.
Arithmetic Operators
global
showpoint
void
12. This manipulator is used to establish a field width for the value immediately following it.
setw
#include <headerfilename>
beginning
Preprocessor
13. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
char
if
whitespace
address
14. Manipulator that causes the insertion point (cursor) to move to the beginning of the next line
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
15. A __________ data member represents class-wide information.
binary operator
continue
case sensitive
static
16. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
selection
cin
definition
semantics
17. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
Stack overflow
function parameters
<<
const
18. A function ________ enables a single function to be defined to perform a task on many different data types.
this
dot (.)
template
case sensitive
19. A variable that is known only within the function in which it is defined is called a ________.
object-oriented analysis and design (OOAD)
function overloading
{ }
local variable
20. The storage-class specifiers are mutable - auto - ________ - extern and static.
switch
heap
register
cin.get(ch)
21. Allows the programmer to store a value in a variable
assignment statement
if...else
void
before
22. Characters used to separate symbols or reserved words or identifiers and statements
semicolon
whitespace
preprocessor
heap
23. 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.
operand value
cin >> variable
dot (.)
Closing brace
24. The sign you use for pointers
loader
operator
unary operator
*
25. A file must be ________ before data can be written to or read from it.
opened
allocating memory
editor
ofstream
26. Keyword public is a(n) _________
dot (.)
classes
opened
access specifier
27. Message displayed to the screen asking user for input; generated with an output statement
operand value
cin
variables
prompt
28. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
globals
&
return
n
29. A recursive function typically has two components: One that provides a means for the recursion to terminate by testing for a(n) ________ case and one that expresses the problem as a recursive call for a slightly simpler problem than the original call
base
continue
selection
auto
30. The ________ program combines the output of the compiler with various library functions to produce an executable image.
function prototype
linker
register
strcmp()
31. A function is invoked with a ________.
function call
loader
object file
operator overloading
32. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
auto
whitespace
friend
t
33. The symbol for the binary scope resolution operator
case sensitive
::
void pointer
associations
34. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
initialized
floating-point
named constant
mixed expression
35. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
const
Unified Modeling Language(UML)
source file
unary operator
36. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
case sensitive
setw
cmath
function overloading
37. Member objects are constructed __________ their enclosing class object.
strcpy()
before
cout
object file
38. Used for function calls and local variables
initialized
type
{ }
stack
39. You must have a ___________ for every variable you intend to use in a program
definition
#include
address
function prototype
40. Two slash marks ( // ) indicate __________ of a comment
cin >> variable
beginning
two-dimensional
globals
41. __________ can be used to assign an object of a class to another object of the same class.
two-dimensional
stack
Default memberwise assignment
object-oriented analysis and design (OOAD)
42. To write data to a file you define an object of which one of the following
source file
strlen()
ofstream
arithmetic expression
43. The stream insertion operator
<<
Default memberwise assignment
arithmetic expression
stack
44. newline
n
selection
new line
virtual functions
45. tab
#include
sorting
t
vectors
46. Nonexecutable statements that are included in a program to provide information about what the program does etc.
comments
void
preprocessor
floating-point
47. The ________ enables access to a global variable with the same name as a variable in the current scope.
variable
Semicolon
unary scope resolution operator (::)
assignment
48. Program components in C++ are called functions and ________.
allocating memory
Counter-controlled or definite
?
classes
49. The stream extraction operator
editor
>>
srand
Stack overflow
50. Default name of executable file
classes
a.out
main
heap