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 __________ should be used to declare the size of an array because it makes the program more scalable.
constant variable
mixed expression
template
const
2. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
break
fixed
associations
switch
3. Operator with only one operand
searching
unary operator
mixed expression
dot (.)
4. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
classes
globals
pointer
static
5. A memory location with a name and data type - its content may be changed during program execution
auto
linker
scope resolution operator
variable
6. 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.
register
dot (.)
private
variable
7. 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
unary scope resolution operator (::)
0
srand
8. All ______ must be declared before they are used.
endl (same as 'n')
variables
classes
unary scope resolution operator (::)
9. A function that calls itself
base
const
derived class
recursive function
10. A variable declared outside any block or function is a ________ variable.
if
void pointer
global
static
11. Message displayed to the screen asking user for input; generated with an output statement
Literals
strlen()
prompt
subscript (or index)
12. A variable that holds the address of another variable.
return
pointer
initialized
two-dimensional
13. The process of placing the elements of an array in order is called ________ the array.
sorting
endl (same as 'n')
#include <headerfilename>
assignment
14. In inheritance the ____________ is the class that supplies the inherited members.
base class
token
a.out
global
15. Lists and tables of values can be stored in arrays or __________.
vectors
case sensitive
definition
derived class
16. The __________ operator reclaims memory previously allocated by new.
semantics
<<
strlen()
delete
17. The ________ of an identifier is the portion of the program in which the identifier can be used.
dot (.)
continue
scope
private
18. To allow file access in a program you must #include this header file.
fstream
cin >> variable
case sensitive
function prototype
19. When a value of one data type is implicitly (automatically) changed to another data type
type coercion
editor
globals
fstream
20. The ________ program combines the output of the compiler with various library functions to produce an executable image.
linker
assignment
a.out
syntax
21. When it is not known in advance how many times a set of statements will be repeated a _________value can be used to terminate the repetition.
two-dimensional
constant variable
Sentinel
void
22. Grammar rules of the language; compiler will try to identify and locate syntax errors
{ }
object file
syntax
left
23. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
//
inheritance
static
recursive function
24. Default name of executable file
a.out
n
classes
editor
25. newline
recursive
n
srand
return
26. __________ can be used to assign an object of a class to another object of the same class.
Default memberwise assignment
pointer
new line
data type
27. Preprocessor directive syntax
information hiding
function prototype
register
#include <headerfilename>
28. Returns the length of a string excluding the null terminator.
strlen()
showpoint
NULL
#include <headerfilename>
29. The stream insertion operator
<<
t
local variable
polymorphism
30. A function ________ enables a single function to be defined to perform a task on many different data types.
template
cmath
return
loader
31. Identifier or expression that is part of the calculation to be performed
operand value
function prototype
scope resolution operator
cout
32. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
getline
floating-point
n
Default memberwise assignment
33. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
showpoint
const datatype identifier = value
#include
polymorphism
34. 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
35. Executable version of program
object file
inline functions
type
auto
36. Used for function calls and local variables
local variable
preprocessor
stack
0
37. A sequence of operands and operators that describe a calculation to be performed
left
register
cin
arithmetic expression
38. Used for dynamically allocated variables
heap
attributes
preprocessor
beginning
39. If a member initializer is not provided for a member object of a class the object's __________ is called.
main
selection
default constructor
fixed
40. Whole numbers - no decimals and no commas included
mixed expression
cmath
int values
return
41. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
n
friend
operand value
base
42. A function that can be used to read character data including whitespace
void
overloading
cin.get(ch)
function call
43. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
classes
const datatype identifier = value
binary operator
strcmp()
44. Function ________ is used to produce random numbers.
syntax
global
function call
rand
45. A function is invoked with a ________.
recursive
function call
default constructor
operand value
46. The keyword ________ is used in a function header to indicate that a function does not return a value or to indicate that a function contains no parameters.
auto
main
escape sequences
void
47. The ________ qualifier is used to declare read-only variables.
global
const
delete
inline functions
48. The process of determining if an array contains a particular key value is called _________ the array.
searching
local variable
named constant
friend
49. This manipulator causes the field to be left-justified with padding spaces printed to the right.
char
reserved words
left
Stack overflow
50. Classes can have relationships with other classes. These relationships are called ________.
associations
private
searching
t