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 __________ operator reclaims memory previously allocated by new.
unary scope resolution operator (::)
delete
cmath
cout
2. data types that refer to numbers with decimals
floating-point
virtual functions
variables
binary operator
3. Compares two strings and returns 0 if they are equal.
showpoint
selection
strcmp()
static
4. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
const
function prototype
cin >> variable
data type
5. Syntax for named constant declaration
register
const datatype identifier = value
constant variable
member
6. A C++ statement that makes a decision is ______.
if
void
pointer
srand
7. The ________ qualifier is used to declare read-only variables.
this
return
initialized
const
8. The stream extraction operator
member
cmath
definition
>>
9. Whole numbers - no decimals and no commas included
int values
//
case sensitive
n
10. newline
char
n
friend
ofstream
11. A member function should be declared static if it does not access __________ class members.
Preprocessor
two-dimensional
non-static
function call
12. All ______ must be declared before they are used.
function scope
allocating memory
variables
Sentinel
13. Names of things that are used in a program - can apply to variables & constants and functions
identifiers
return
information hiding
/n
14. A set of values together with a set of operations
allocating memory
data type
linker
operand value
15. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
if...else
before
syntax
derived class
16. Most calculations are normally performed by ______ statements.
assignment
>>
binary operator
srand
17. A function that can be used to read character data including whitespace
#include directive
Unified Modeling Language(UML)
vectors
cin.get(ch)
18. Initializers __________ must be used to initialize constant members of a class.
member
before
fstream
NULL
19. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
function overloading
t
mixed expression
subscript (or index)
20. A __________ should be used to declare the size of an array because it makes the program more scalable.
static
Semicolon
constant variable
Counter-controlled or definite
21. The stream insertion operator
stack
<<
initialized
operator overloading
22. The ________ enables access to a global variable with the same name as a variable in the current scope.
unary scope resolution operator (::)
Stack overflow
function scope
selection
23. 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
24. Nonexecutable statements that are included in a program to provide information about what the program does etc.
comments
private
local variable
register
25. Identifier or expression that is part of the calculation to be performed
recursive
t
operand value
identifiers
26. A __________ data member represents class-wide information.
friend
if...else
static
assignment statement
27. The three values that can be used to initialize a pointer are 0 - __________ and an address.
a.out
void pointer
default constructor
NULL
28. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
base class
recursive
::
getline
29. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
register
Closing brace
#include
Counter-controlled or definite
30. In inheritance the ____________ is the class that supplies the inherited members.
non-static
base class
static
cmath
31. Repeating a set of instructions a specific number of times is called_________repetition.
% modulus
Stack overflow
main
Counter-controlled or definite
32. 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.
named constant
function overloading
pointer
continue
33. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
unary scope resolution operator (::)
overloading
Default memberwise assignment
strcmp()
34. An array that uses two subscripts is referred to as a(n) _________ array.
two-dimensional
showpoint
information hiding
public
35. The ________ of an identifier is the portion of the program in which the identifier can be used.
function overloading
Default memberwise assignment
scope
static
36. The ________ program transfers the executable image of a C++ program from disk to memory.
//
static_cast<char>(65)
loader
derived class
37. = & | are examples of ____________.
opened
special symbols
function scope
floating-point
38. Used to qualify hidden names so that they can be used.
switch
information hiding
scope resolution operator
vectors
39. A filestream variable that represents the default input source
linker
Preprocessor
cin
classes
40. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
token
virtual functions
auto
rand
41. This manipulator is used to establish a field width for the value immediately following it.
.cpp
named constant
function call
setw
42. The sign you use for references
&
overloading
cin >> variable
type coercion
43. A memory location with a name and data type - its content may be changed during program execution
int values
register
Default memberwise assignment
variable
44. The address-of operator. it is used to assign pointers and to print the address of variables.
const
&
static
recursive function
45. The escape sequence ___ when output with cout and the stream insertion operator - causes the cursor to position to the beginning of the next line on the screen.
srand
derived class
void
/n
46. Class members specified as _________ are accessible anywhere an object of the class is in scope.
named constant
public
loader
Literals
47. Default name of executable file
access specifier
srand
a.out
source file
48. To allow file access in a program you must #include this header file.
Closing brace
template
fstream
arithmetic expression
49. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
beginning
pointer
selection
NULL
50. Message displayed to the screen asking user for input; generated with an output statement
prompt
default constructor
srand
inline functions