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. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
semantics
{ }
selection
&
2. A program that finds and attaches to your program the indicated libraries for compilation
binary operator
case sensitive
pointer
preprocessor
3. 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.
Stack overflow
preprocessor
Counter-controlled or definite
inheritance
4. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
base
Stack overflow
Arithmetic Operators
two-dimensional
5. A filestream variable that represents the default output device
Counter-controlled or definite
type
unary scope resolution operator (::)
cout
6. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
recursive
Counter-controlled or definite
/n
overloading
7. The modulus operator (%) can be used only with __________.
rand
type casting (conversion)
::
integer operands
8. Forces the computer to display decimal point and trailing zeroes
token
semicolon
showpoint
constant variable
9. The storage-class specifiers are mutable - auto - ________ - extern and static.
variable
inheritance
strlen()
register
10. The ________ of an identifier is the portion of the program in which the identifier can be used.
continue
strlen()
case sensitive
scope
11. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
private
cin
left
static
12. int namespace include using return examples of ___________
function call
classes
cin.get(ch)
reserve words
13. The address-of operator. it is used to assign pointers and to print the address of variables.
cin.get(ch)
&
getline
operand value
14. Member objects are constructed __________ their enclosing class object.
before
beginning
if...else
virtual functions
15. The ________ program transfers the executable image of a C++ program from disk to memory.
loader
assignment statement
virtual functions
public
16. tab
t
Sentinel
Stack overflow
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
base class
dot (.)
type casting (conversion)
18. * / % + -
function overloading
Arithmetic Operators
recursive function
virtual functions
19. An array that uses two subscripts is referred to as a(n) _________ array.
two-dimensional
type casting (conversion)
static
base class
20. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
assignment
subscript (or index)
unary operator
globals
21. Nonexecutable statements that are included in a program to provide information about what the program does etc.
strcmp()
classes
comments
template
22. This manipulator causes the field to be left-justified with padding spaces printed to the right.
?
left
continue
srand
23. The __________ operator reclaims memory previously allocated by new.
strlen()
delete
semantics
member
24. The elements of an array are related by the fact that they have the same name and ___________.
strcmp()
static
type
NULL
25. Every C++ program begins execution at the function _________.
escape sequences
scope
main
type casting (conversion)
26. The three values that can be used to initialize a pointer are 0 - __________ and an address.
identifiers
polymorphism
NULL
recursive function
27. 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.
cin
const datatype identifier = value
Stack overflow
dot (.)
28. You can declare default values for a function in the ____________________.
getline
Counter-controlled or definite
function parameters
pointer
29. The _________ begins the body of every function and the _________ ends the body of every function.
ofstream
{ }
new line
initialized
30. Used for dynamically allocated variables
heap
prompt
attributes
?
31. A memory location with a name and data type - its content may be changed during program execution
NULL
variable
const datatype identifier = value
information hiding
32. To explicitly indicate that a value is to be converted to another type
static
heap
type casting (conversion)
if
33. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
&
Counter-controlled or definite
NULL
this
34. Words that are used for special purposes in a program
scope
reserved words
inline functions
int values
35. Symbol that denotes an action to be performed
preprocessor
opened
operator
showpoint
36. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
friend
<<
static
assignment
37. A function is invoked with a ________.
searching
friend
function call
function parameters
38. The size & shape & color and weight of an object are considered
Literals
attributes
getline
void
39. Returns the length of a string excluding the null terminator.
cin.get(ch)
private
Unified Modeling Language(UML)
strlen()
40. A variable declared outside any block or function is a ________ variable.
unary operator
Preprocessor
operator overloading
global
41. The sign you use for references
function call
&
attributes
type
42. 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.
variables
continue
cmath
public
43. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
public
#include
recursive
function overloading
44. Header file that contains commonly performed mathematical functions
cmath
template
reserved words
pointer
45. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
semantics
non-static
.cpp
Arithmetic Operators
46. The conditional operator. it evaluates a line of code and returns one thing if the condition is true and a different thing if the condition is false.
break
floating-point
?
address
47. A constant object must be __________; it cannot be modified after it is created.
register
pointer
data type
initialized
48. Most calculations are normally performed by ______ statements.
assignment
attributes
recursive
scope resolution operator
49. A filestream variable that represents the default input source
cin
pointer
cout
&
50. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
static_cast<char>(65)
special symbols
opened
break