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. newline
function scope
*
pointer
n
2. The _____ causes the contents of another file to be inserted into a program.
//
Stack overflow
#include directive
this
3. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
stack
//
case sensitive
a.out
4. The stream insertion operator
classes
function prototype
virtual functions
<<
5. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
comments
opened
function overloading
rand
6. Every C++ program begins execution at the function _________.
overloading
main
.cpp
associations
7. To write data to a file you define an object of which one of the following
ofstream
new line
NULL
static
8. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
cin >> variable
like-type expression
Unified Modeling Language(UML)
const datatype identifier = value
9. To explicitly indicate that a value is to be converted to another type
private
opened
static_cast<char>(65)
type casting (conversion)
10. Symbol that denotes an action to be performed
two-dimensional
operator
continue
editor
11. directive A statement that starts with a # is called a ____________.
cmath
subscript (or index)
Preprocessor
syntax
12. 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.
strlen()
continue
getline
0
13. The ________ qualifier is used to declare read-only variables.
const
strlen()
void pointer
unary scope resolution operator (::)
14. A function ________ enables a single function to be defined to perform a task on many different data types.
editor
.cpp
template
polymorphism
15. For a local variable in a function to retain its value between calls to the function it must be declared with the ________ storage-class specifier.
variables
global
static
showpoint
16. The ________ enables access to a global variable with the same name as a variable in the current scope.
access specifier
integer operands
unary scope resolution operator (::)
type coercion
17. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
NULL
Stack overflow
*
mixed expression
18. The __________ operator reclaims memory previously allocated by new.
function parameters
delete
polymorphism
const
19. Syntax for named constant declaration
heap
operator
const datatype identifier = value
source file
20. Manipulator that causes the insertion point (cursor) to move to the beginning of the next line
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
21. The idea that you can call the same function and the output will depend on the type of object you're using.
polymorphism
pointer
recursive function
&
22. The size & shape & color and weight of an object are considered
attributes
type casting (conversion)
break
inline functions
23. Use 2 characters to represent one
setw
a.out
/n
escape sequences
24. In inheritance the ____________ is the class the receives the inherited members.
default constructor
switch
derived class
linker
25. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
#include
globals
getline
unary operator
26. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
t
token
linker
Sentinel
27. Message displayed to the screen asking user for input; generated with an output statement
prompt
Preprocessor
t
static_cast<char>(65)
28. A pointer is a variable that contains as its value the____________ of another variable.
unary scope resolution operator (::)
classes
object-oriented analysis and design (OOAD)
address
29. Lists and tables of values can be stored in arrays or __________.
address
vectors
stack
base
30. The ________ program combines the output of the compiler with various library functions to produce an executable image.
selection
linker
associations
?
31. The three values that can be used to initialize a pointer are 0 - __________ and an address.
NULL
non-static
overloading
attributes
32. The address-of operator. it is used to assign pointers and to print the address of variables.
const
&
operator
break
33. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
derived class
new line
return
switch
34. 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.
loader
Default memberwise assignment
inheritance
virtual functions
35. The sign you use for pointers
Closing brace
*
default constructor
private
36. 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.
Unified Modeling Language(UML)
function parameters
inheritance
strlen()
37. This manipulator causes the field to be left-justified with padding spaces printed to the right.
.cpp
void
object-oriented analysis and design (OOAD)
left
38. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
sorting
switch
if...else
global
39. Nonexecutable statements that are included in a program to provide information about what the program does etc.
comments
binary operator
Arithmetic Operators
recursive
40. Forces the computer to display decimal point and trailing zeroes
static
::
showpoint
address
41. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
pointer
preprocessor
classes
data type
42. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
named constant
#include directive
inheritance
const datatype identifier = value
43. Repeating a set of instructions a specific number of times is called_________repetition.
member
classes
operator
Counter-controlled or definite
44. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
syntax
strlen()
return
static
45. Function ________ is used to set the random number seed to randomize a program.
member
/n
srand
Counter-controlled or definite
46. Names of things that are used in a program - can apply to variables & constants and functions
identifiers
Arithmetic Operators
access specifier
return
47. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
char
getline
function parameters
escape sequences
48. 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
object-oriented analysis and design (OOAD)
ofstream
<<
49. Used to qualify hidden names so that they can be used.
scope resolution operator
rand
attributes
cin
50. Creates a copy of a string.
strcpy()
unary scope resolution operator (::)
base class
delete