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 function that calls itself either directly or indirectly - through another function) - is a ________ function.
&
recursive
unary scope resolution operator (::)
attributes
2. Used for function calls and local variables
break
stack
int values
access specifier
3. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
if...else
subscript (or index)
base
const
4. This manipulator is used to establish a field width for the value immediately following it.
fixed
like-type expression
&
setw
5. Compares two strings and returns 0 if they are equal.
strcmp()
cin >> variable
fstream
type
6. Syntax for named constant declaration
setw
return
const datatype identifier = value
two-dimensional
7. int namespace include using return examples of ___________
ofstream
static
template
reserve words
8. The ________ qualifier is used to declare read-only variables.
two-dimensional
const datatype identifier = value
const
initialized
9. If a member initializer is not provided for a member object of a class the object's __________ is called.
default constructor
void
variables
type casting (conversion)
10. A ________ program executes before the compiler's translation phase begins.
recursive function
preprocessor
vectors
default constructor
11. Initializers __________ must be used to initialize constant members of a class.
scope
syntax
member
if...else
12. Message displayed to the screen asking user for input; generated with an output statement
&
identifiers
Unified Modeling Language(UML)
prompt
13. Member objects are constructed __________ their enclosing class object.
int values
vectors
before
identifiers
14. An expression in which all operands have the same data type - result will have the same data type as operands
attributes
identifiers
arithmetic expression
like-type expression
15. Symbol that denotes an action to be performed
operator
recursive function
if
attributes
16. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
a.out
operator overloading
semantics
subscript (or index)
17. 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.
return
main
virtual functions
friend
18. Keyword public is a(n) _________
access specifier
constant variable
pointer
source file
19. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
initialized
const
>>
member
20. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
cin.get(ch)
//
function scope
selection
21. Characters used to separate symbols or reserved words or identifiers and statements
% modulus
whitespace
access specifier
strlen()
22. The process of analyzing and designing a system from an object-oriented point of view is called ________.
object-oriented analysis and design (OOAD)
showpoint
virtual functions
const
23. 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
binary operator
Closing brace
ofstream
24. A constant object must be __________; it cannot be modified after it is created.
globals
initialized
main
default constructor
25. In inheritance the ____________ is the class that supplies the inherited members.
.cpp
opened
base class
Sentinel
26. Associate an identifier with a memory location
dot (.)
preprocessor
base class
allocating memory
27. Objects have the property of ________although objects may know how to communicate with one another across well-defined interfaces - they normally are not allowed to know how other objects are implemented.
information hiding
Sentinel
reserved words
variables
28. Two slash marks ( // ) indicate __________ of a comment
Literals
operator
new line
beginning
29. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
preprocessor
this
two-dimensional
>>
30. Every C++ program begins execution at the function _________.
object-oriented analysis and design (OOAD)
strcpy()
t
main
31. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
function overloading
linker
strcmp()
function call
32. The ________ of an identifier is the portion of the program in which the identifier can be used.
Default memberwise assignment
scope
strcpy()
?
33. Names of things that are used in a program - can apply to variables & constants and functions
syntax
main
identifiers
operand value
34. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
friend
{ }
<<
Sentinel
35. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
&
type
setw
cin >> variable
36. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
>>
function prototype
scope
polymorphism
37. A variable declared outside any block or function is a ________ variable.
new line
/n
object-oriented analysis and design (OOAD)
global
38. Type casting syntax
char
static_cast<char>(65)
continue
cin.get(ch)
39. You can declare default values for a function in the ____________________.
function parameters
function overloading
::
identifiers
40. 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.
if...else
getline
{ }
Sentinel
41. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
case sensitive
type coercion
address
function scope
42. Every C++ statement ends with a(n) _________.
type
escape sequences
void
semicolon
43. __________ can be used to assign an object of a class to another object of the same class.
Default memberwise assignment
cin.get(ch)
cin >> variable
type coercion
44. The _____ causes the contents of another file to be inserted into a program.
classes
semantics
#include directive
fixed
45. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
function call
const datatype identifier = value
default constructor
auto
46. * / % + -
non-static
Arithmetic Operators
ofstream
reserved words
47. A type of pointer that can point at objects of any data type.
function prototype
#include directive
left
void pointer
48. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
globals
endl (same as 'n')
&
new line
49. An array that uses two subscripts is referred to as a(n) _________ array.
a.out
void pointer
two-dimensional
static_cast<char>(65)
50. Operator with only one operand
Sentinel
unary operator
&
register