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. Keyword public is a(n) _________
access specifier
const
ofstream
Preprocessor
2. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
<<
setw
polymorphism
overloading
3. __________ can be used to assign an object of a class to another object of the same class.
new line
Default memberwise assignment
unary operator
&
4. To allow file access in a program you must #include this header file.
const
unary operator
endl (same as 'n')
fstream
5. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
semantics
preprocessor
% modulus
function scope
6. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
type casting (conversion)
<<
cin >> variable
globals
7. If a member initializer is not provided for a member object of a class the object's __________ is called.
default constructor
mixed expression
Arithmetic Operators
cin
8. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
Preprocessor
switch
int values
ofstream
9. The process of analyzing and designing a system from an object-oriented point of view is called ________.
>>
selection
this
object-oriented analysis and design (OOAD)
10. Grammar rules of the language; compiler will try to identify and locate syntax errors
syntax
local variable
Sentinel
main
11. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
preprocessor
fstream
named constant
initialized
12. The stream insertion operator
base class
main
<<
char
13. Nonexecutable statements that are included in a program to provide information about what the program does etc.
comments
source file
operator overloading
pointer
14. Two slash marks ( // ) indicate __________ of a comment
const
cin
void
beginning
15. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
::
% modulus
delete
Stack overflow
16. Executable version of program
object file
virtual functions
strlen()
scope resolution operator
17. 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
function scope
Literals
base
main
18. Used for dynamically allocated variables
#include directive
heap
variables
whitespace
19. The ________ of an identifier is the portion of the program in which the identifier can be used.
scope
linker
Unified Modeling Language(UML)
operand value
20. The size & shape & color and weight of an object are considered
attributes
binary operator
#include directive
void pointer
21. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
attributes
inline functions
this
member
22. A filestream variable that represents the default input source
object-oriented analysis and design (OOAD)
cin
type casting (conversion)
searching
23. Member objects are constructed __________ their enclosing class object.
before
local variable
strlen()
static_cast<char>(65)
24. For every opening brace in a C++ program there must be a ______________.
recursive
Closing brace
static_cast<char>(65)
function prototype
25. The elements of an array are related by the fact that they have the same name and ___________.
type
void pointer
attributes
cmath
26. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
editor
inheritance
new line
default constructor
27. 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.
whitespace
/n
int values
void
28. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
cin
recursive
register
classes
29. Syntax for named constant declaration
global
scope
preprocessor
const datatype identifier = value
30. A variable that is known only within the function in which it is defined is called a ________.
/n
return
object file
local variable
31. A set of values together with a set of operations
data type
recursive function
register
local variable
32. A file must be ________ before data can be written to or read from it.
constant variable
sorting
static
opened
33. Whole numbers - no decimals and no commas included
0
int values
inline functions
register
34. A __________ should be used to declare the size of an array because it makes the program more scalable.
constant variable
cin >> variable
unary operator
function scope
35. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
public
globals
linker
scope
36. An expression that has operands with different data types
mixed expression
int values
getline
/n
37. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
classes
function scope
Preprocessor
switch
38. The only integer that can be assigned directly to a pointer is_____________.
rand
associations
sorting
0
39. A program that finds and attaches to your program the indicated libraries for compilation
overloading
preprocessor
t
{ }
40. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
::
register
recursive function
fixed
41. Operator with two operands
srand
vectors
function scope
binary operator
42. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
dot (.)
cout
beginning
function overloading
43. An array that uses two subscripts is referred to as a(n) _________ array.
friend
two-dimensional
address
Arithmetic Operators
44. When a value of one data type is implicitly (automatically) changed to another data type
member
token
return
type coercion
45. Function ________ is used to set the random number seed to randomize a program.
srand
information hiding
cout
recursive
46. The symbol for the binary scope resolution operator
virtual functions
inline functions
rand
::
47. The ________ program combines the output of the compiler with various library functions to produce an executable image.
cin.get(ch)
template
linker
>>
48. Used to qualify hidden names so that they can be used.
friend
reserve words
scope resolution operator
{ }
49. A variable that holds the address of another variable.
pointer
public
const datatype identifier = value
preprocessor
50. Default name of executable file
>>
identifiers
switch
a.out