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.
strlen()
operator overloading
cmath
constant variable
2. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
if...else
variable
this
constant variable
3. Syntax for named constant declaration
const datatype identifier = value
pointer
comments
object-oriented analysis and design (OOAD)
4. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
stack
identifiers
strlen()
selection
5. = & | are examples of ____________.
?
function call
setw
special symbols
6. All C++ Variables are_________.
Stack overflow
case sensitive
special symbols
Sentinel
7. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
beginning
global
overloading
heap
8. Nonexecutable statements that are included in a program to provide information about what the program does etc.
special symbols
comments
rand
function scope
9. The sign you use for pointers
*
editor
register
allocating memory
10. In inheritance the ____________ is the class that supplies the inherited members.
NULL
switch
local variable
base class
11. The process of determining if an array contains a particular key value is called _________ the array.
syntax
address
private
searching
12. An array that uses two subscripts is referred to as a(n) _________ array.
const datatype identifier = value
friend
floating-point
two-dimensional
13. Operator with only one operand
editor
syntax
Stack overflow
unary operator
14. To write data to a file you define an object of which one of the following
#include <headerfilename>
base
ofstream
globals
15. 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.
void
recursive function
base class
assignment
16. Use 2 characters to represent one
operator overloading
Preprocessor
escape sequences
rand
17. A function ________ enables a single function to be defined to perform a task on many different data types.
template
cin >> variable
linker
char
18. Every C++ program begins execution at the function _________.
int values
main
scope
classes
19. Used for dynamically allocated variables
getline
member
heap
inheritance
20. The __________ operator reclaims memory previously allocated by new.
this
function parameters
delete
source file
21. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
local variable
whitespace
inheritance
#include
22. A function that can be used to read character data including whitespace
void
cin.get(ch)
const
before
23. Naming convention for C++ programs
this
.cpp
arithmetic expression
member
24. Forces the computer to display decimal point and trailing zeroes
function scope
showpoint
searching
NULL
25. Every C++ statement ends with a(n) _________.
function parameters
unary operator
semicolon
dot (.)
26. This manipulator is used to establish a field width for the value immediately following it.
int values
setw
linker
static
27. Whole numbers - no decimals and no commas included
token
int values
const datatype identifier = value
heap
28. A variable that is known only within the function in which it is defined is called a ________.
switch
beginning
attributes
local variable
29. An expression that has operands with different data types
scope resolution operator
mixed expression
dot (.)
recursive function
30. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
&
selection
named constant
this
31. A pointer is a variable that contains as its value the____________ of another variable.
address
0
data type
semicolon
32. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
cin
const
Arithmetic Operators
sorting
33. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
virtual functions
void
const
classes
34. Associate an identifier with a memory location
derived class
static
allocating memory
{ }
35. C++ programs are normally typed into a computer using a(n) ________ program.
?
stack
private
editor
36. This manipulator causes the field to be left-justified with padding spaces printed to the right.
>>
left
variable
floating-point
37. A program that finds and attaches to your program the indicated libraries for compilation
preprocessor
floating-point
overloading
n
38. All ______ must be declared before they are used.
variables
strlen()
linker
#include
39. Class members specified as _________ are accessible anywhere an object of the class is in scope.
public
switch
Preprocessor
strcmp()
40. A human readable file that contains C++ program
unary operator
associations
operator overloading
source file
41. int namespace include using return examples of ___________
Unified Modeling Language(UML)
reserve words
pointer
const datatype identifier = value
42. 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
void
virtual functions
fstream
base
43. Words that are used for special purposes in a program
reserved words
special symbols
preprocessor
classes
44. 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.
Preprocessor
?
cin.get(ch)
n
45. Default name of executable file
opened
a.out
const
data type
46. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
binary operator
srand
function overloading
preprocessor
47. The process of analyzing and designing a system from an object-oriented point of view is called ________.
object-oriented analysis and design (OOAD)
setw
recursive
data type
48. 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.
type
a.out
inheritance
<<
49. A __________ data member represents class-wide information.
Arithmetic Operators
public
dot (.)
static
50. The sign you use for references
attributes
cin
beginning
&