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. Every C++ program begins execution at the function _________.
strcpy()
% modulus
virtual functions
main
2. Used for dynamically allocated variables
type casting (conversion)
token
heap
data type
3. 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
4. Sets floating-point values to a fixed decimal format
fixed
operand value
dot (.)
Arithmetic Operators
5. This manipulator is used to establish a field width for the value immediately following it.
setw
strcmp()
void pointer
fixed
6. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
void
data type
recursive
object-oriented analysis and design (OOAD)
7. Classes can have relationships with other classes. These relationships are called ________.
#include directive
associations
unary operator
semantics
8. A __________ data member represents class-wide information.
static
mixed expression
static_cast<char>(65)
void
9. Objects have the property of ________although objects may know how to communicate with one another across well-defined interfaces - they normally are not allowed to know how other objects are implemented.
information hiding
setw
beginning
showpoint
10. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
type coercion
semantics
member
friend
11. To write data to a file you define an object of which one of the following
cout
operator
Semicolon
ofstream
12. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
special symbols
globals
pointer
source file
13. The symbol for the binary scope resolution operator
operator
left
Default memberwise assignment
::
14. The three values that can be used to initialize a pointer are 0 - __________ and an address.
default constructor
switch
NULL
token
15. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
const
inline functions
fixed
template
16. A function ________ enables a single function to be defined to perform a task on many different data types.
searching
attributes
function prototype
template
17. Naming convention for C++ programs
derived class
pointer
.cpp
local variable
18. The ________ enables access to a global variable with the same name as a variable in the current scope.
unary scope resolution operator (::)
t
classes
allocating memory
19. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
fixed
virtual functions
variables
function overloading
20. Lists and tables of values can be stored in arrays or __________.
if
non-static
subscript (or index)
vectors
21. The stream insertion operator
const
comments
.cpp
<<
22. 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.
two-dimensional
void
getline
Preprocessor
23. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
const
//
globals
like-type expression
24. 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
comments
base
function prototype
classes
25. The sign you use for pointers
cmath
Arithmetic Operators
function scope
*
26. Creates a copy of a string.
inline functions
reserve words
strcpy()
type
27. The stream extraction operator
searching
cin
operator
>>
28. The number used to refer to a particular element of an array is called its ________.
classes
semicolon
Arithmetic Operators
subscript (or index)
29. To allow file access in a program you must #include this header file.
initialized
fstream
identifiers
<<
30. Function ________ is used to set the random number seed to randomize a program.
dot (.)
srand
#include <headerfilename>
reserved words
31. C++ programs are normally typed into a computer using a(n) ________ program.
classes
editor
cin.get(ch)
assignment statement
32. For a local variable in a function to retain its value between calls to the function it must be declared with the ________ storage-class specifier.
static
editor
vectors
information hiding
33. Use 2 characters to represent one
//
polymorphism
escape sequences
srand
34. You can declare default values for a function in the ____________________.
Default memberwise assignment
a.out
function parameters
srand
35. Most calculations are normally performed by ______ statements.
assignment
*
allocating memory
Arithmetic Operators
36. A variable that is known only within the function in which it is defined is called a ________.
inline functions
variable
static_cast<char>(65)
local variable
37. Syntax for named constant declaration
strcmp()
#include directive
const datatype identifier = value
Stack overflow
38. Words that are used for special purposes in a program
data type
function prototype
reserved words
reserve words
39. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
semicolon
NULL
scope
selection
40. An expression in which all operands have the same data type - result will have the same data type as operands
function call
function scope
t
like-type expression
41. Preprocessor directive syntax
sorting
base class
#include <headerfilename>
t
42. 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
strcmp()
auto
unary scope resolution operator (::)
43. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
Preprocessor
preprocessor
strcmp()
Unified Modeling Language(UML)
44. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
getline
strlen()
srand
#include
45. A constant object must be __________; it cannot be modified after it is created.
local variable
template
semantics
initialized
46. 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.
scope resolution operator
{ }
virtual functions
strlen()
47. A sequence of operands and operators that describe a calculation to be performed
initialized
assignment
?
arithmetic expression
48. In inheritance the ____________ is the class the receives the inherited members.
void
arithmetic expression
void pointer
derived class
49. A C++ statement that makes a decision is ______.
cout
if
initialized
const
50. The process of placing the elements of an array in order is called ________ the array.
sorting
linker
.cpp
heap