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. To write data to a file you define an object of which one of the following
preprocessor
escape sequences
if...else
ofstream
2. Two slash marks ( // ) indicate __________ of a comment
auto
definition
pointer
beginning
3. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
Stack overflow
inline functions
function scope
variables
4. A function that calls itself
new line
variables
recursive function
const datatype identifier = value
5. The symbol for the binary scope resolution operator
classes
attributes
::
assignment
6. The size & shape & color and weight of an object are considered
allocating memory
operator
attributes
like-type expression
7. The ________ program combines the output of the compiler with various library functions to produce an executable image.
operator overloading
classes
linker
cmath
8. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
<<
static
function overloading
like-type expression
9. In inheritance the ____________ is the class the receives the inherited members.
derived class
case sensitive
return
data type
10. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
Closing brace
>>
this
fixed
11. A program that finds and attaches to your program the indicated libraries for compilation
non-static
preprocessor
void
base class
12. Used for dynamically allocated variables
heap
local variable
preprocessor
break
13. Creates a copy of a string.
strcpy()
before
operand value
loader
14. A memory location with a name and data type - its content may be changed during program execution
cin
stack
#include directive
variable
15. An expression that has operands with different data types
strcmp()
inline functions
semicolon
mixed expression
16. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
rand
const
if...else
subscript (or index)
17. The process of determining if an array contains a particular key value is called _________ the array.
information hiding
register
integer operands
searching
18. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
new line
preprocessor
void
assignment
19. Naming convention for C++ programs
switch
.cpp
cin >> variable
comments
20. data types that refer to numbers with decimals
this
floating-point
const
/n
21. A ________ program executes before the compiler's translation phase begins.
opened
globals
function scope
preprocessor
22. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
vectors
*
void
/n
23. The sign you use for pointers
setw
*
pointer
inline functions
24. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
linker
reserve words
operator overloading
searching
25. Use 2 characters to represent one
prompt
member
escape sequences
inline functions
26. Keyword public is a(n) _________
source file
reserved words
access specifier
if...else
27. You must have a ___________ for every variable you intend to use in a program
left
?
new line
definition
28. You can declare default values for a function in the ____________________.
function parameters
base class
recursive
t
29. A variable that holds the address of another variable.
pointer
classes
reserved words
global
30. A human readable file that contains C++ program
source file
vectors
Preprocessor
base class
31. newline
n
Sentinel
reserve words
assignment statement
32. To allow file access in a program you must #include this header file.
register
const datatype identifier = value
fstream
globals
33. A set of values together with a set of operations
variables
pointer
data type
template
34. 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
address
arithmetic expression
assignment
35. A __________ should be used to declare the size of an array because it makes the program more scalable.
subscript (or index)
constant variable
allocating memory
if...else
36. Most calculations are normally performed by ______ statements.
editor
return
assignment
inheritance
37. __________ can be used to assign an object of a class to another object of the same class.
endl (same as 'n')
Closing brace
Default memberwise assignment
classes
38. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
base
classes
ofstream
sorting
39. The idea that you can call the same function and the output will depend on the type of object you're using.
searching
polymorphism
this
information hiding
40. A constant object must be __________; it cannot be modified after it is created.
initialized
Unified Modeling Language(UML)
named constant
<<
41. A type of pointer that can point at objects of any data type.
Unified Modeling Language(UML)
srand
member
void pointer
42. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
recursive
setw
endl (same as 'n')
return
43. A function is invoked with a ________.
function call
% modulus
n
pointer
44. Message displayed to the screen asking user for input; generated with an output statement
pointer
n
prompt
strcmp()
45. The modulus operator (%) can be used only with __________.
integer operands
ofstream
special symbols
mixed expression
46. A variable that is known only within the function in which it is defined is called a ________.
pointer
local variable
if...else
source file
47. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
Arithmetic Operators
getline
n
delete
48. 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.
endl (same as 'n')
setw
continue
operator overloading
49. A C++ statement that makes a decision is ______.
if
beginning
address
inheritance
50. Allows the programmer to store a value in a variable
derived class
assignment statement
function parameters
object-oriented analysis and design (OOAD)