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. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
return
local variable
Unified Modeling Language(UML)
heap
2. The ________ statement in a called function passes the value of an expression back to the calling function.
like-type expression
polymorphism
classes
return
3. A pointer is a variable that contains as its value the____________ of another variable.
loader
editor
address
member
4. The escape sequence ___ when output with cout and the stream insertion operator - causes the cursor to position to the beginning of the next line on the screen.
Sentinel
case sensitive
/n
function overloading
5. You can declare default values for a function in the ____________________.
new line
preprocessor
function parameters
derived class
6. newline
getline
n
const
Arithmetic Operators
7. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
function prototype
::
Literals
Unified Modeling Language(UML)
8. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
case sensitive
.cpp
operator overloading
beginning
9. The only integer that can be assigned directly to a pointer is_____________.
information hiding
Sentinel
static_cast<char>(65)
0
10. The _____ causes the contents of another file to be inserted into a program.
unary operator
#include directive
return
strlen()
11. A variable that holds the address of another variable.
int values
auto
prompt
pointer
12. 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.
left
special symbols
inheritance
arithmetic expression
13. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
variables
Arithmetic Operators
globals
searching
14. A function that calls itself
subscript (or index)
classes
static
recursive function
15. The sign you use for references
recursive function
cin.get(ch)
&
operator
16. The ________ enables access to a global variable with the same name as a variable in the current scope.
/n
reserve words
unary scope resolution operator (::)
setw
17. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
#include
.cpp
before
NULL
18. Function ________ is used to set the random number seed to randomize a program.
unary operator
dot (.)
pointer
srand
19. 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.
{ }
syntax
continue
ofstream
20. A variable that is known only within the function in which it is defined is called a ________.
break
local variable
showpoint
integer operands
21. * / % + -
editor
searching
base class
Arithmetic Operators
22. The modulus operator (%) can be used only with __________.
integer operands
information hiding
void
function overloading
23. Use 2 characters to represent one
escape sequences
::
member
int values
24. Identifier or expression that is part of the calculation to be performed
function scope
char
private
operand value
25. A filestream variable that represents the default input source
floating-point
cmath
cin
reserved words
26. Naming convention for C++ programs
static
.cpp
#include directive
0
27. The elements of an array are related by the fact that they have the same name and ___________.
srand
type
&
this
28. 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.
unary scope resolution operator (::)
static
strcpy()
local variable
29. Initializers __________ must be used to initialize constant members of a class.
Sentinel
member
operand value
address
30. The idea that you can call the same function and the output will depend on the type of object you're using.
friend
static
template
polymorphism
31. Used for dynamically allocated variables
friend
token
loader
heap
32. Grammar rules of the language; compiler will try to identify and locate syntax errors
syntax
linker
Unified Modeling Language(UML)
friend
33. int namespace include using return examples of ___________
type casting (conversion)
reserve words
strcpy()
#include
34. Member objects are constructed __________ their enclosing class object.
preprocessor
preprocessor
void
before
35. Lists and tables of values can be stored in arrays or __________.
auto
vectors
cin.get(ch)
private
36. 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.
rand
Sentinel
comments
main
37. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
preprocessor
editor
auto
break
38. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
variable
function call
char
*
39. The number used to refer to a particular element of an array is called its ________.
subscript (or index)
default constructor
recursive function
function overloading
40. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
selection
overloading
function scope
constant variable
41. 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
linker
polymorphism
type casting (conversion)
42. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
function overloading
unary operator
semicolon
if...else
43. All C++ Variables are_________.
case sensitive
default constructor
getline
pointer
44. 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.
function prototype
dot (.)
comments
auto
45. Message displayed to the screen asking user for input; generated with an output statement
address
prompt
information hiding
Arithmetic Operators
46. The ________ program combines the output of the compiler with various library functions to produce an executable image.
linker
?
#include
getline
47. This manipulator causes the field to be left-justified with padding spaces printed to the right.
left
reserve words
polymorphism
associations
48. Operator with two operands
binary operator
constant variable
non-static
classes
49. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
data type
function overloading
function call
default constructor
50. When a value of one data type is implicitly (automatically) changed to another data type
&
delete
void pointer
type coercion