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. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
const
scope resolution operator
polymorphism
<<
2. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
const datatype identifier = value
Unified Modeling Language(UML)
this
register
3. For every opening brace in a C++ program there must be a ______________.
pointer
Closing brace
base class
delete
4. Names of things that are used in a program - can apply to variables & constants and functions
identifiers
function scope
like-type expression
setw
5. A variable that holds the address of another variable.
before
Preprocessor
comments
pointer
6. A variable declared outside any block or function is a ________ variable.
dot (.)
#include <headerfilename>
if
global
7. A sequence of operands and operators that describe a calculation to be performed
source file
arithmetic expression
sorting
#include
8. The process of determining if an array contains a particular key value is called _________ the array.
searching
scope
&
base class
9. 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
register
operand value
base
mixed expression
10. Operator with two operands
access specifier
variables
local variable
binary operator
11. The ________ program combines the output of the compiler with various library functions to produce an executable image.
object-oriented analysis and design (OOAD)
template
non-static
linker
12. Returns the length of a string excluding the null terminator.
binary operator
cin >> variable
strlen()
srand
13. You can declare default values for a function in the ____________________.
searching
Arithmetic Operators
data type
function parameters
14. Used to qualify hidden names so that they can be used.
scope resolution operator
if
endl (same as 'n')
int values
15. Naming convention for C++ programs
whitespace
.cpp
::
void pointer
16. The sign you use for pointers
beginning
*
constant variable
&
17. The idea that you can call the same function and the output will depend on the type of object you're using.
polymorphism
switch
return
Closing brace
18. An array that uses two subscripts is referred to as a(n) _________ array.
void
unary scope resolution operator (::)
setw
two-dimensional
19. An expression in which all operands have the same data type - result will have the same data type as operands
cin
like-type expression
fstream
Unified Modeling Language(UML)
20. The size & shape & color and weight of an object are considered
two-dimensional
token
::
attributes
21. A ________ program executes before the compiler's translation phase begins.
Stack overflow
preprocessor
main
strcmp()
22. If a member initializer is not provided for a member object of a class the object's __________ is called.
{ }
void pointer
type coercion
default constructor
23. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
int values
return
showpoint
Default memberwise assignment
24. directive A statement that starts with a # is called a ____________.
constant variable
loader
&
Preprocessor
25. A filestream variable that represents the default output device
static_cast<char>(65)
attributes
scope resolution operator
cout
26. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
attributes
preprocessor
recursive
selection
27. A memory location with a name and data type - its content may be changed during program execution
endl (same as 'n')
pointer
non-static
variable
28. To write data to a file you define an object of which one of the following
ofstream
classes
>>
*
29. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
#include <headerfilename>
preprocessor
function prototype
register
30. The stream insertion operator
<<
getline
special symbols
delete
31. Repeating a set of instructions a specific number of times is called_________repetition.
access specifier
{ }
Counter-controlled or definite
static_cast<char>(65)
32. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
if
continue
token
identifiers
33. Allows the programmer to store a value in a variable
stack
friend
like-type expression
assignment statement
34. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
vectors
function overloading
Sentinel
char
35. The ________ statement in a called function passes the value of an expression back to the calling function.
Closing brace
virtual functions
int values
return
36. 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.
derived class
return
dot (.)
strlen()
37. The number used to refer to a particular element of an array is called its ________.
Sentinel
assignment statement
int values
subscript (or index)
38. A function is invoked with a ________.
t
searching
cout
function call
39. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
void
opened
object file
auto
40. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
rand
char
overloading
&
41. = & | are examples of ____________.
special symbols
source file
virtual functions
strcmp()
42. The modulus operator (%) can be used only with __________.
fstream
integer operands
function parameters
register
43. You must have a ___________ for every variable you intend to use in a program
Literals
token
inheritance
definition
44. Preprocessor directive syntax
% modulus
#include <headerfilename>
{ }
//
45. 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.
arithmetic expression
continue
return
fstream
46. tab
Default memberwise assignment
t
assignment statement
void
47. These are data items whose values do not change while the program is running
/n
Literals
type coercion
Counter-controlled or definite
48. A human readable file that contains C++ program
function call
*
source file
reserve words
49. The ________ qualifier is used to declare read-only variables.
continue
const
if...else
cin >> variable
50. Identifier or expression that is part of the calculation to be performed
preprocessor
Closing brace
information hiding
operand value