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. Used for function calls and local variables
function parameters
Stack overflow
reserve words
stack
2. A variable that is known only within the function in which it is defined is called a ________.
#include <headerfilename>
if
local variable
friend
3. The __________ operator reclaims memory previously allocated by new.
Semicolon
*
delete
#include directive
4. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
main
floating-point
//
this
5. A __________ data member represents class-wide information.
t
static
opened
editor
6. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
preprocessor
switch
const
cin >> variable
7. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
syntax
recursive
reserve words
&
8. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
left
inline functions
associations
virtual functions
9. Lists and tables of values can be stored in arrays or __________.
NULL
vectors
function overloading
strcmp()
10. A human readable file that contains C++ program
non-static
source file
t
#include directive
11. The process of analyzing and designing a system from an object-oriented point of view is called ________.
object-oriented analysis and design (OOAD)
static_cast<char>(65)
main
base class
12. int namespace include using return examples of ___________
pointer
>>
reserve words
stack
13. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
const
scope resolution operator
arithmetic expression
recursive function
14. 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
named constant
ofstream
int values
15. A function is invoked with a ________.
cmath
recursive
function call
break
16. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
polymorphism
friend
.cpp
heap
17. Creates a copy of a string.
scope resolution operator
/n
strcpy()
continue
18. A C++ statement that makes a decision is ______.
function parameters
if
case sensitive
endl (same as 'n')
19. The ________ program combines the output of the compiler with various library functions to produce an executable image.
#include
searching
linker
<<
20. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
static_cast<char>(65)
function scope
selection
operator overloading
21. Grammar rules of the language; compiler will try to identify and locate syntax errors
syntax
//
srand
attributes
22. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
access specifier
friend
#include
type casting (conversion)
23. tab
inheritance
recursive
t
recursive function
24. An expression that has operands with different data types
left
beginning
sorting
mixed expression
25. Identifier or expression that is part of the calculation to be performed
whitespace
operand value
?
source file
26. This is used to mark the end of a complete C++ programming statement.
Arithmetic Operators
cin
function overloading
Semicolon
27. 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.
source file
inheritance
member
opened
28. A memory location with a name and data type - its content may be changed during program execution
data type
template
register
variable
29. Forces the computer to display decimal point and trailing zeroes
friend
type casting (conversion)
showpoint
function scope
30. An operator that can only be used with int values. result will always be an int.
initialized
{ }
% modulus
floating-point
31. Preprocessor directive syntax
#include <headerfilename>
?
recursive function
initialized
32. A filestream variable that represents the default input source
fixed
type
cin
unary scope resolution operator (::)
33. = & | are examples of ____________.
special symbols
#include directive
int values
if...else
34. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
static_cast<char>(65)
setw
if...else
constant variable
35. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
pointer
const
a.out
endl (same as 'n')
36. 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
this
if
recursive
37. Function ________ is used to produce random numbers.
type
char
NULL
rand
38. * / % + -
fixed
break
Arithmetic Operators
opened
39. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
getline
% modulus
special symbols
this
40. Operator with only one operand
Default memberwise assignment
reserve words
unary operator
default constructor
41. Names of things that are used in a program - can apply to variables & constants and functions
heap
identifiers
*
Closing brace
42. The three values that can be used to initialize a pointer are 0 - __________ and an address.
NULL
function call
escape sequences
unary operator
43. The stream insertion operator
static
a.out
<<
address
44. Compares two strings and returns 0 if they are equal.
virtual functions
strcmp()
data type
type coercion
45. The idea that you can call the same function and the output will depend on the type of object you're using.
a.out
Semicolon
global
polymorphism
46. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
#include
% modulus
case sensitive
cin >> variable
47. When a value of one data type is implicitly (automatically) changed to another data type
type
#include
function parameters
type coercion
48. The storage-class specifiers are mutable - auto - ________ - extern and static.
register
polymorphism
classes
heap
49. Nonexecutable statements that are included in a program to provide information about what the program does etc.
type casting (conversion)
ofstream
comments
strcpy()
50. A pointer is a variable that contains as its value the____________ of another variable.
address
derived class
<<
non-static