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. Returns the length of a string excluding the null terminator.
strlen()
identifiers
getline
whitespace
2. Forces the computer to display decimal point and trailing zeroes
private
public
showpoint
Default memberwise assignment
3. The number used to refer to a particular element of an array is called its ________.
address
stack
operator overloading
subscript (or index)
4. You can declare default values for a function in the ____________________.
function parameters
preprocessor
variable
operator
5. 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.
virtual functions
#include <headerfilename>
cin
register
6. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
NULL
friend
function prototype
::
7. The process of determining if an array contains a particular key value is called _________ the array.
preprocessor
rand
Stack overflow
searching
8. Every C++ statement ends with a(n) _________.
int values
semicolon
virtual functions
setw
9. To write data to a file you define an object of which one of the following
classes
ofstream
if
Sentinel
10. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
function overloading
break
pointer
void pointer
11. An expression in which all operands have the same data type - result will have the same data type as operands
like-type expression
subscript (or index)
<<
friend
12. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
selection
strcmp()
prompt
<<
13. All ______ must be declared before they are used.
constant variable
type
variables
int values
14. 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.
private
void
preprocessor
dot (.)
15. Associate an identifier with a memory location
unary scope resolution operator (::)
searching
two-dimensional
allocating memory
16. The _________ begins the body of every function and the _________ ends the body of every function.
strcmp()
{ }
#include <headerfilename>
dot (.)
17. The stream extraction operator
if...else
heap
char
>>
18. The ________ program combines the output of the compiler with various library functions to produce an executable image.
template
0
stack
linker
19. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
vectors
stack
preprocessor
register
20. A type of pointer that can point at objects of any data type.
>>
scope resolution operator
void pointer
rand
21. In inheritance the ____________ is the class that supplies the inherited members.
like-type expression
Stack overflow
comments
base class
22. Operator with two operands
binary operator
template
vectors
polymorphism
23. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
prompt
if...else
integer operands
derived class
24. Keyword public is a(n) _________
inheritance
access specifier
break
editor
25. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
function overloading
showpoint
object-oriented analysis and design (OOAD)
NULL
26. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
pointer
t
operator overloading
cin >> variable
27. An expression that has operands with different data types
mixed expression
associations
0
loader
28. The ________ statement in a called function passes the value of an expression back to the calling function.
address
Literals
local variable
return
29. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
private
{ }
getline
prompt
30. A constant object must be __________; it cannot be modified after it is created.
unary operator
delete
initialized
preprocessor
31. The process of placing the elements of an array in order is called ________ the array.
heap
two-dimensional
preprocessor
sorting
32. Every C++ program begins execution at the function _________.
main
/n
::
type
33. 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.
?
syntax
NULL
new line
34. Function ________ is used to produce random numbers.
rand
derived class
beginning
function overloading
35. Symbol that denotes an action to be performed
semicolon
classes
% modulus
operator
36. Names of things that are used in a program - can apply to variables & constants and functions
void pointer
assignment
Literals
identifiers
37. 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
38. The storage-class specifiers are mutable - auto - ________ - extern and static.
recursive function
register
dot (.)
rand
39. Used for function calls and local variables
stack
virtual functions
rand
access specifier
40. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
register
token
Counter-controlled or definite
continue
41. To explicitly indicate that a value is to be converted to another type
type casting (conversion)
return
base
function parameters
42. In inheritance the ____________ is the class the receives the inherited members.
register
token
derived class
*
43. 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
&
selection
dot (.)
base
44. The sign you use for references
local variable
&
private
srand
45. A __________ should be used to declare the size of an array because it makes the program more scalable.
showpoint
&
function overloading
constant variable
46. A function is invoked with a ________.
void pointer
function call
pointer
type coercion
47. A filestream variable that represents the default output device
base class
definition
cout
function call
48. An operator that can only be used with int values. result will always be an int.
% modulus
t
srand
unary scope resolution operator (::)
49. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
overloading
attributes
0
::
50. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
assignment
opened
function scope
register