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. Lists and tables of values can be stored in arrays or __________.
continue
vectors
register
derived class
2. Words that are used for special purposes in a program
reserved words
derived class
if
named constant
3. The stream extraction operator
special symbols
{ }
global
>>
4. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
#include directive
pointer
recursive
polymorphism
5. An array that uses two subscripts is referred to as a(n) _________ array.
polymorphism
two-dimensional
assignment
type coercion
6. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
arithmetic expression
if...else
recursive function
void pointer
7. Repeating a set of instructions a specific number of times is called_________repetition.
allocating memory
Counter-controlled or definite
initialized
prompt
8. Whole numbers - no decimals and no commas included
information hiding
int values
Semicolon
void pointer
9. __________ can be used to assign an object of a class to another object of the same class.
definition
Default memberwise assignment
global
operator overloading
10. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
mixed expression
variable
::
this
11. An operator that can only be used with int values. result will always be an int.
% modulus
NULL
preprocessor
{ }
12. Operator with two operands
binary operator
allocating memory
switch
subscript (or index)
13. Keyword public is a(n) _________
Closing brace
editor
initialized
access specifier
14. 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.
member
dot (.)
Default memberwise assignment
Stack overflow
15. 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.
associations
Sentinel
main
strlen()
16. For every opening brace in a C++ program there must be a ______________.
Closing brace
selection
vectors
variable
17. A variable that holds the address of another variable.
two-dimensional
% modulus
sorting
pointer
18. You must have a ___________ for every variable you intend to use in a program
definition
static
allocating memory
virtual functions
19. To allow file access in a program you must #include this header file.
fstream
globals
private
void
20. Message displayed to the screen asking user for input; generated with an output statement
overloading
::
default constructor
prompt
21. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
private
return
globals
operand value
22. The idea that you can call the same function and the output will depend on the type of object you're using.
>>
#include directive
case sensitive
polymorphism
23. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
assignment
variables
void
function overloading
24. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
continue
whitespace
operator
classes
25. A function is invoked with a ________.
function call
NULL
dot (.)
.cpp
26. A __________ data member represents class-wide information.
allocating memory
&
>>
static
27. Classes can have relationships with other classes. These relationships are called ________.
setw
allocating memory
associations
dot (.)
28. Type casting syntax
break
cin.get(ch)
object-oriented analysis and design (OOAD)
static_cast<char>(65)
29. 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.
strlen()
information hiding
address
comments
30. Names of things that are used in a program - can apply to variables & constants and functions
local variable
ofstream
integer operands
identifiers
31. The keyword ________ is used in a function header to indicate that a function does not return a value or to indicate that a function contains no parameters.
return
member
preprocessor
void
32. The ________ statement in a called function passes the value of an expression back to the calling function.
before
% modulus
srand
return
33. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
access specifier
friend
//
&
34. data types that refer to numbers with decimals
t
floating-point
#include <headerfilename>
identifiers
35. The sign you use for pointers
floating-point
*
token
#include
36. Naming convention for C++ programs
two-dimensional
this
.cpp
escape sequences
37. newline
void
source file
n
unary scope resolution operator (::)
38. The ________ enables access to a global variable with the same name as a variable in the current scope.
assignment
comments
classes
unary scope resolution operator (::)
39. Forces the computer to display decimal point and trailing zeroes
if
showpoint
constant variable
function prototype
40. The storage-class specifiers are mutable - auto - ________ - extern and static.
public
Arithmetic Operators
object file
register
41. Identifier or expression that is part of the calculation to be performed
template
classes
operand value
operator overloading
42. A function that can be used to read character data including whitespace
unary scope resolution operator (::)
comments
strcmp()
cin.get(ch)
43. Allows the programmer to store a value in a variable
assignment statement
/n
static_cast<char>(65)
char
44. A constant object must be __________; it cannot be modified after it is created.
initialized
vectors
void
Sentinel
45. The ________ program transfers the executable image of a C++ program from disk to memory.
pointer
inheritance
loader
source file
46. The modulus operator (%) can be used only with __________.
integer operands
cin.get(ch)
cin >> variable
operand value
47. 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.
non-static
cin
continue
assignment
48. Executable version of program
Arithmetic Operators
default constructor
object file
case sensitive
49. A __________ should be used to declare the size of an array because it makes the program more scalable.
delete
scope resolution operator
loader
constant variable
50. A function that calls itself
recursive function
binary operator
function parameters
information hiding