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 set of values together with a set of operations
data type
named constant
initialized
new line
2. A variable that is known only within the function in which it is defined is called a ________.
{ }
0
local variable
Arithmetic Operators
3. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
Preprocessor
inline functions
non-static
private
4. Header file that contains commonly performed mathematical functions
return
cmath
cin.get(ch)
prompt
5. The process of placing the elements of an array in order is called ________ the array.
0
fixed
sorting
.cpp
6. The process of determining if an array contains a particular key value is called _________ the array.
reserve words
whitespace
>>
searching
7. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
break
pointer
cin >> variable
unary operator
8. 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.
constant variable
before
>>
Sentinel
9. A filestream variable that represents the default output device
Stack overflow
cout
strcpy()
inline functions
10. Allows the programmer to store a value in a variable
assignment statement
object-oriented analysis and design (OOAD)
unary scope resolution operator (::)
left
11. data types that refer to numbers with decimals
if...else
floating-point
fstream
fixed
12. 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
linker
Closing brace
base
preprocessor
13. Class members specified as _________ are accessible anywhere an object of the class is in scope.
public
selection
fstream
heap
14. The process of analyzing and designing a system from an object-oriented point of view is called ________.
&
cout
object-oriented analysis and design (OOAD)
.cpp
15. All ______ must be declared before they are used.
function call
setw
variables
integer operands
16. An array that uses two subscripts is referred to as a(n) _________ array.
int values
two-dimensional
register
editor
17. In inheritance the ____________ is the class that supplies the inherited members.
#include
function prototype
syntax
base class
18. The ________ program transfers the executable image of a C++ program from disk to memory.
/n
loader
type
recursive function
19. A C++ statement that makes a decision is ______.
if
this
/n
showpoint
20. 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.
showpoint
operator overloading
void
template
21. Creates a copy of a string.
auto
constant variable
strcpy()
arithmetic expression
22. Keyword public is a(n) _________
endl (same as 'n')
char
access specifier
main
23. Function ________ is used to produce random numbers.
Stack overflow
globals
rand
function scope
24. The only integer that can be assigned directly to a pointer is_____________.
if...else
const datatype identifier = value
0
object-oriented analysis and design (OOAD)
25. Program components in C++ are called functions and ________.
delete
% modulus
whitespace
classes
26. Type casting syntax
sorting
template
operator
static_cast<char>(65)
27. To write data to a file you define an object of which one of the following
setw
beginning
inline functions
ofstream
28. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
//
left
inline functions
this
29. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
recursive
type coercion
operator overloading
showpoint
30. A member function should be declared static if it does not access __________ class members.
non-static
main
return
operator overloading
31. Used for dynamically allocated variables
heap
assignment
before
escape sequences
32. 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.
continue
Default memberwise assignment
scope
virtual functions
33. If a member initializer is not provided for a member object of a class the object's __________ is called.
new line
default constructor
preprocessor
static
34. The number used to refer to a particular element of an array is called its ________.
#include <headerfilename>
heap
subscript (or index)
static_cast<char>(65)
35. tab
reserve words
two-dimensional
t
source file
36. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
#include
switch
Unified Modeling Language(UML)
cin.get(ch)
37. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
if...else
#include
type coercion
left
38. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
Stack overflow
char
token
derived class
39. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
information hiding
function scope
mixed expression
const
40. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
return
break
global
const datatype identifier = value
41. You must have a ___________ for every variable you intend to use in a program
delete
definition
const datatype identifier = value
type coercion
42. Causes the program to immediately goes back to the top of the loop. the remainder of the statements in the loop are ignored for this current iteration.
continue
Unified Modeling Language(UML)
Semicolon
loader
43. Member objects are constructed __________ their enclosing class object.
before
int values
Stack overflow
>>
44. Returns the length of a string excluding the null terminator.
function call
floating-point
strlen()
fixed
45. Whole numbers - no decimals and no commas included
escape sequences
source file
virtual functions
int values
46. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
register
char
#include
if...else
47. A variable that holds the address of another variable.
?
friend
pointer
ofstream
48. Characters used to separate symbols or reserved words or identifiers and statements
Unified Modeling Language(UML)
whitespace
scope resolution operator
char
49. Associate an identifier with a memory location
::
classes
allocating memory
const
50. To allow file access in a program you must #include this header file.
Stack overflow
linker
fstream
type coercion