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. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
Semicolon
inline functions
rand
assignment
2. Symbol that denotes an action to be performed
>>
static
operator
#include <headerfilename>
3. A constant object must be __________; it cannot be modified after it is created.
comments
rand
virtual functions
initialized
4. A function that can be used to read character data including whitespace
cin.get(ch)
variable
type coercion
syntax
5. A variable that is known only within the function in which it is defined is called a ________.
local variable
loader
arithmetic expression
source file
6. directive A statement that starts with a # is called a ____________.
Preprocessor
fstream
initialized
setw
7. The idea that you can call the same function and the output will depend on the type of object you're using.
polymorphism
new line
char
local variable
8. Program components in C++ are called functions and ________.
classes
syntax
break
function prototype
9. A function ________ enables a single function to be defined to perform a task on many different data types.
Semicolon
constant variable
template
&
10. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
semantics
arithmetic expression
?
void
11. 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
base
attributes
new line
local variable
12. = & | are examples of ____________.
setw
special symbols
&
source file
13. Used for dynamically allocated variables
Default memberwise assignment
continue
heap
*
14. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
global
function prototype
special symbols
showpoint
15. 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.
member
address
dot (.)
recursive
16. The symbol for the binary scope resolution operator
address
/n
::
Closing brace
17. newline
Unified Modeling Language(UML)
reserve words
case sensitive
n
18. A ________ program executes before the compiler's translation phase begins.
selection
new line
preprocessor
Default memberwise assignment
19. * / % + -
Arithmetic Operators
public
void pointer
function overloading
20. Two slash marks ( // ) indicate __________ of a comment
beginning
strcmp()
public
initialized
21. 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.
object file
pointer
?
whitespace
22. Repeating a set of instructions a specific number of times is called_________repetition.
Counter-controlled or definite
if...else
address
0
23. The ________ qualifier is used to declare read-only variables.
void
const
public
static
24. You must have a ___________ for every variable you intend to use in a program
definition
access specifier
reserve words
if
25. Function ________ is used to set the random number seed to randomize a program.
srand
type coercion
function call
cin
26. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
before
cin >> variable
unary operator
break
27. A pointer is a variable that contains as its value the____________ of another variable.
subscript (or index)
address
Arithmetic Operators
function overloading
28. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
*
//
return
linker
29. The storage-class specifiers are mutable - auto - ________ - extern and static.
static_cast<char>(65)
template
register
strlen()
30. If a member initializer is not provided for a member object of a class the object's __________ is called.
new line
pointer
default constructor
endl (same as 'n')
31. 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.
classes
object file
variables
continue
32. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
identifiers
friend
delete
register
33. 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.
rand
inheritance
cout
&
34. Every C++ program begins execution at the function _________.
dot (.)
main
static
preprocessor
35. A variable that holds the address of another variable.
static
pointer
cin.get(ch)
derived class
36. Most calculations are normally performed by ______ statements.
assignment
a.out
% modulus
>>
37. This manipulator causes the field to be left-justified with padding spaces printed to the right.
left
type coercion
member
setw
38. All ______ must be declared before they are used.
left
variable
register
variables
39. An expression that has operands with different data types
pointer
mixed expression
reserve words
polymorphism
40. This manipulator is used to establish a field width for the value immediately following it.
srand
syntax
.cpp
setw
41. Used for function calls and local variables
semicolon
associations
stack
operand value
42. 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.
endl (same as 'n')
rand
virtual functions
access specifier
43. C++ programs are normally typed into a computer using a(n) ________ program.
static
information hiding
comments
editor
44. The ________ of an identifier is the portion of the program in which the identifier can be used.
scope
getline
static
operator overloading
45. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
information hiding
Unified Modeling Language(UML)
pointer
source file
46. You can declare default values for a function in the ____________________.
strcpy()
named constant
dot (.)
function parameters
47. 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.
continue
Sentinel
inline functions
register
48. Associate an identifier with a memory location
scope
allocating memory
*
this
49. Returns the length of a string excluding the null terminator.
subscript (or index)
Counter-controlled or definite
const
strlen()
50. Use 2 characters to represent one
.cpp
main
escape sequences
base class