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. 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.
&
object-oriented analysis and design (OOAD)
continue
new line
2. This manipulator is used to establish a field width for the value immediately following it.
sorting
setw
?
if...else
3. Identifier or expression that is part of the calculation to be performed
syntax
operand value
comments
left
4. __________ can be used to assign an object of a class to another object of the same class.
before
Default memberwise assignment
.cpp
whitespace
5. Message displayed to the screen asking user for input; generated with an output statement
cmath
access specifier
prompt
delete
6. 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
editor
{ }
recursive function
base
7. Lists and tables of values can be stored in arrays or __________.
virtual functions
#include directive
vectors
like-type expression
8. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
int values
whitespace
register
void pointer
9. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
new line
recursive
arithmetic expression
template
10. Operator with only one operand
reserved words
Literals
const
unary operator
11. A type of pointer that can point at objects of any data type.
Closing brace
editor
void pointer
preprocessor
12. The elements of an array are related by the fact that they have the same name and ___________.
sorting
{ }
return
type
13. Class members specified as _________ are accessible anywhere an object of the class is in scope.
*
public
rand
return
14. Every C++ program begins execution at the function _________.
access specifier
virtual functions
main
//
15. The storage-class specifiers are mutable - auto - ________ - extern and static.
const
function parameters
two-dimensional
register
16. 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.
reserved words
>>
information hiding
assignment
17. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
{ }
this
#include <headerfilename>
definition
18. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
selection
information hiding
overloading
this
19. tab
% modulus
t
subscript (or index)
static
20. The ________ program combines the output of the compiler with various library functions to produce an executable image.
inline functions
int values
linker
address
21. Initializers __________ must be used to initialize constant members of a class.
if
member
inheritance
//
22. The process of placing the elements of an array in order is called ________ the array.
editor
heap
register
sorting
23. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
friend
function call
private
return
24. Whole numbers - no decimals and no commas included
scope resolution operator
initialized
int values
case sensitive
25. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
syntax
const
associations
preprocessor
26. Used for function calls and local variables
Stack overflow
stack
Sentinel
ofstream
27. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
preprocessor
Stack overflow
% modulus
binary operator
28. The address-of operator. it is used to assign pointers and to print the address of variables.
&
unary operator
char
assignment statement
29. Used for dynamically allocated variables
heap
/n
special symbols
classes
30. The _________ begins the body of every function and the _________ ends the body of every function.
{ }
Semicolon
>>
new line
31. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
fixed
reserve words
friend
cout
32. The _____ causes the contents of another file to be inserted into a program.
integer operands
allocating memory
binary operator
#include directive
33. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
classes
type coercion
pointer
semantics
34. A variable that is known only within the function in which it is defined is called a ________.
prompt
base class
local variable
assignment
35. Grammar rules of the language; compiler will try to identify and locate syntax errors
syntax
template
type casting (conversion)
prompt
36. All ______ must be declared before they are used.
::
variables
searching
a.out
37. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
before
information hiding
token
inline functions
38. The number used to refer to a particular element of an array is called its ________.
named constant
strcmp()
subscript (or index)
void
39. The idea that you can call the same function and the output will depend on the type of object you're using.
derived class
Preprocessor
polymorphism
information hiding
40. Words that are used for special purposes in a program
type
reserved words
function overloading
semicolon
41. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
strlen()
globals
assignment statement
subscript (or index)
42. The ________ statement in a called function passes the value of an expression back to the calling function.
return
allocating memory
static
void pointer
43. The three values that can be used to initialize a pointer are 0 - __________ and an address.
default constructor
NULL
break
address
44. A constant object must be __________; it cannot be modified after it is created.
Closing brace
vectors
initialized
escape sequences
45. Executable version of program
auto
mixed expression
whitespace
object file
46. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
integer operands
token
editor
type coercion
47. This is used to mark the end of a complete C++ programming statement.
subscript (or index)
access specifier
Semicolon
rand
48. A file must be ________ before data can be written to or read from it.
static_cast<char>(65)
ofstream
opened
variables
49. The ________ enables access to a global variable with the same name as a variable in the current scope.
if
base class
unary scope resolution operator (::)
unary operator
50. The symbol for the binary scope resolution operator
static
*
register
::