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. In inheritance the ____________ is the class that supplies the inherited members.
operand value
arithmetic expression
recursive
base class
2. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
register
>>
floating-point
switch
3. The stream insertion operator
0
<<
&
static_cast<char>(65)
4. A constant object must be __________; it cannot be modified after it is created.
operator
Sentinel
type casting (conversion)
initialized
5. Nonexecutable statements that are included in a program to provide information about what the program does etc.
definition
comments
Sentinel
data type
6. int namespace include using return examples of ___________
*
endl (same as 'n')
t
reserve words
7. Initializers __________ must be used to initialize constant members of a class.
opened
public
syntax
member
8. The _________ begins the body of every function and the _________ ends the body of every function.
{ }
::
base
function scope
9. To explicitly indicate that a value is to be converted to another type
variables
*
type casting (conversion)
recursive function
10. An expression that has operands with different data types
mixed expression
break
case sensitive
identifiers
11. Use 2 characters to represent one
escape sequences
globals
semicolon
variable
12. The _____ causes the contents of another file to be inserted into a program.
auto
Unified Modeling Language(UML)
NULL
#include directive
13. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
reserved words
semicolon
inline functions
classes
14. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
prompt
{ }
&
recursive
15. A function is invoked with a ________.
private
function call
fstream
cmath
16. The storage-class specifiers are mutable - auto - ________ - extern and static.
access specifier
definition
friend
register
17. Creates a copy of a string.
inheritance
#include
strcpy()
heap
18. The three values that can be used to initialize a pointer are 0 - __________ and an address.
assignment statement
NULL
this
pointer
19. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
binary operator
if
pointer
globals
20. The ________ qualifier is used to declare read-only variables.
cin.get(ch)
const
stack
showpoint
21. You must have a ___________ for every variable you intend to use in a program
source file
constant variable
definition
::
22. The stream extraction operator
recursive function
reserved words
variable
>>
23. Function ________ is used to produce random numbers.
rand
Counter-controlled or definite
classes
inheritance
24. The process of determining if an array contains a particular key value is called _________ the array.
.cpp
searching
function parameters
recursive
25. If a member initializer is not provided for a member object of a class the object's __________ is called.
strcmp()
base class
&
default constructor
26. Header file that contains commonly performed mathematical functions
>>
whitespace
linker
cmath
27. Member objects are constructed __________ their enclosing class object.
cin >> variable
object-oriented analysis and design (OOAD)
if
before
28. Keyword public is a(n) _________
before
Counter-controlled or definite
void pointer
access specifier
29. A __________ should be used to declare the size of an array because it makes the program more scalable.
constant variable
floating-point
&
globals
30. For every opening brace in a C++ program there must be a ______________.
Closing brace
type
endl (same as 'n')
public
31. 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
32. Allows the programmer to store a value in a variable
register
variable
&
assignment statement
33. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
token
function prototype
n
void
34. An expression in which all operands have the same data type - result will have the same data type as operands
like-type expression
function prototype
new line
::
35. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
this
if
cin >> variable
preprocessor
36. A memory location with a name and data type - its content may be changed during program execution
variable
reserve words
opened
fstream
37. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
like-type expression
cmath
*
function scope
38. Words that are used for special purposes in a program
a.out
classes
reserved words
const
39. Sets floating-point values to a fixed decimal format
semantics
beginning
fixed
return
40. A ________ program executes before the compiler's translation phase begins.
preprocessor
function prototype
heap
derived class
41. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
object file
Stack overflow
object-oriented analysis and design (OOAD)
whitespace
42. The idea that you can call the same function and the output will depend on the type of object you're using.
strcmp()
return
preprocessor
polymorphism
43. Repeating a set of instructions a specific number of times is called_________repetition.
searching
ofstream
Counter-controlled or definite
function call
44. Two slash marks ( // ) indicate __________ of a comment
beginning
classes
type
overloading
45. Lists and tables of values can be stored in arrays or __________.
inline functions
virtual functions
vectors
assignment statement
46. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
char
token
const
Literals
47. A pointer is a variable that contains as its value the____________ of another variable.
setw
return
main
address
48. Executable version of program
access specifier
object file
type coercion
overloading
49. Naming convention for C++ programs
.cpp
#include <headerfilename>
return
heap
50. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
char
integer operands
private
strlen()