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 sequence of operands and operators that describe a calculation to be performed
*
arithmetic expression
mixed expression
global
2. A function that calls itself
two-dimensional
function parameters
recursive function
overloading
3. A program that finds and attaches to your program the indicated libraries for compilation
static
operand value
preprocessor
binary operator
4. Allows the programmer to store a value in a variable
getline
assignment statement
floating-point
register
5. The ________ enables access to a global variable with the same name as a variable in the current scope.
unary scope resolution operator (::)
information hiding
preprocessor
recursive
6. A human readable file that contains C++ program
source file
n
syntax
main
7. A variable that is known only within the function in which it is defined is called a ________.
getline
comments
Closing brace
local variable
8. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
register
selection
auto
allocating memory
9. In inheritance the ____________ is the class the receives the inherited members.
public
derived class
showpoint
whitespace
10. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
cin.get(ch)
/n
private
template
11. A filestream variable that represents the default output device
int values
Closing brace
register
cout
12. A function ________ enables a single function to be defined to perform a task on many different data types.
template
void
identifiers
base class
13. The sign you use for pointers
associations
operand value
<<
*
14. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
#include
overloading
Arithmetic Operators
semantics
15. Repeating a set of instructions a specific number of times is called_________repetition.
const
mixed expression
Counter-controlled or definite
case sensitive
16. This is used to mark the end of a complete C++ programming statement.
type
data type
Semicolon
*
17. The idea that you can call the same function and the output will depend on the type of object you're using.
polymorphism
&
return
globals
18. A function is invoked with a ________.
allocating memory
source file
function call
overloading
19. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
base class
inline functions
globals
delete
20. The _________ begins the body of every function and the _________ ends the body of every function.
editor
{ }
reserved words
Semicolon
21. C++ programs are normally typed into a computer using a(n) ________ program.
searching
editor
function prototype
data type
22. Whole numbers - no decimals and no commas included
scope
access specifier
source file
int values
23. = & | are examples of ____________.
Preprocessor
Stack overflow
void
special symbols
24. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
linker
semantics
pointer
before
25. A memory location with a name and data type - its content may be changed during program execution
derived class
variable
identifiers
static_cast<char>(65)
26. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
>>
definition
inline functions
if...else
27. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
char
#include <headerfilename>
before
variables
28. This manipulator is used to establish a field width for the value immediately following it.
Unified Modeling Language(UML)
.cpp
constant variable
setw
29. This manipulator causes the field to be left-justified with padding spaces printed to the right.
left
semicolon
&
int values
30. 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
fixed
Unified Modeling Language(UML)
scope
base
31. __________ can be used to assign an object of a class to another object of the same class.
n
Default memberwise assignment
type coercion
polymorphism
32. Compares two strings and returns 0 if they are equal.
void pointer
strcmp()
?
unary operator
33. The three values that can be used to initialize a pointer are 0 - __________ and an address.
inheritance
type casting (conversion)
heap
NULL
34. Program components in C++ are called functions and ________.
stack
inheritance
classes
two-dimensional
35. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
static
operator overloading
classes
#include <headerfilename>
36. 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.
cin >> variable
void
global
preprocessor
37. Default name of executable file
fstream
a.out
case sensitive
variable
38. The process of analyzing and designing a system from an object-oriented point of view is called ________.
object-oriented analysis and design (OOAD)
register
return
non-static
39. directive A statement that starts with a # is called a ____________.
auto
local variable
Preprocessor
&
40. 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.
reserved words
dot (.)
pointer
cin
41. Initializers __________ must be used to initialize constant members of a class.
operand value
polymorphism
delete
member
42. Names of things that are used in a program - can apply to variables & constants and functions
classes
semantics
before
identifiers
43. Words that are used for special purposes in a program
loader
ofstream
attributes
reserved words
44. A file must be ________ before data can be written to or read from it.
opened
variable
Default memberwise assignment
type
45. The ________ program combines the output of the compiler with various library functions to produce an executable image.
linker
syntax
const
this
46. A function that can be used to read character data including whitespace
cin.get(ch)
cout
data type
continue
47. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
selection
.cpp
linker
function overloading
48. Used for function calls and local variables
stack
beginning
scope resolution operator
srand
49. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
break
classes
strlen()
identifiers
50. Function ________ is used to produce random numbers.
scope
definition
rand
whitespace