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. Compares two strings and returns 0 if they are equal.
::
inheritance
strcmp()
heap
2. tab
editor
semicolon
definition
t
3. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
#include <headerfilename>
assignment statement
recursive function
function prototype
4. The __________ operator reclaims memory previously allocated by new.
integer operands
initialized
register
delete
5. If a member initializer is not provided for a member object of a class the object's __________ is called.
operand value
this
arithmetic expression
default constructor
6. A function that calls itself
recursive function
access specifier
identifiers
type casting (conversion)
7. An operator that can only be used with int values. result will always be an int.
associations
polymorphism
% modulus
Literals
8. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
register
identifiers
cin >> variable
?
9. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
void
switch
if
rand
10. A type of pointer that can point at objects of any data type.
% modulus
default constructor
case sensitive
void pointer
11. Words that are used for special purposes in a program
allocating memory
scope resolution operator
operator
reserved words
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.
opened
continue
pointer
sorting
13. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
preprocessor
fixed
vectors
named constant
14. Associate an identifier with a memory location
allocating memory
beginning
private
source file
15. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
allocating memory
n
if...else
auto
16. The ________ program transfers the executable image of a C++ program from disk to memory.
return
auto
loader
{ }
17. Initializers __________ must be used to initialize constant members of a class.
&
member
fstream
mixed expression
18. Sets floating-point values to a fixed decimal format
fixed
scope
subscript (or index)
two-dimensional
19. You must have a ___________ for every variable you intend to use in a program
named constant
definition
loader
left
20. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
template
prompt
auto
getline
21. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
function scope
break
Semicolon
function parameters
22. 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.
#include directive
mixed expression
dot (.)
syntax
23. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
case sensitive
pointer
cin.get(ch)
>>
24. 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.
strcmp()
cin.get(ch)
virtual functions
information hiding
25. A variable that is known only within the function in which it is defined is called a ________.
semicolon
char
getline
local variable
26. The process of placing the elements of an array in order is called ________ the array.
sorting
escape sequences
searching
template
27. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
auto
rand
t
template
28. A variable that holds the address of another variable.
allocating memory
pointer
return
Preprocessor
29. A function is invoked with a ________.
srand
function call
address
global
30. 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.
prompt
n
pointer
virtual functions
31. These are data items whose values do not change while the program is running
getline
Counter-controlled or definite
Literals
floating-point
32. The number used to refer to a particular element of an array is called its ________.
cout
classes
reserved words
subscript (or index)
33. For every opening brace in a C++ program there must be a ______________.
ofstream
special symbols
Closing brace
opened
34. Symbol that denotes an action to be performed
new line
escape sequences
*
operator
35. * / % + -
address
Arithmetic Operators
comments
type
36. Member objects are constructed __________ their enclosing class object.
a.out
loader
before
const datatype identifier = value
37. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
Stack overflow
strcmp()
reserved words
before
38. The sign you use for references
strcpy()
&
stack
access specifier
39. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
recursive
friend
classes
Preprocessor
40. This manipulator is used to establish a field width for the value immediately following it.
setw
Counter-controlled or definite
type casting (conversion)
/n
41. The ________ statement in a called function passes the value of an expression back to the calling function.
sorting
.cpp
return
before
42. Repeating a set of instructions a specific number of times is called_________repetition.
return
Counter-controlled or definite
base
new line
43. 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.
dot (.)
default constructor
Sentinel
Closing brace
44. Allows the programmer to store a value in a variable
Sentinel
function prototype
loader
assignment statement
45. The storage-class specifiers are mutable - auto - ________ - extern and static.
register
srand
linker
fixed
46. To allow file access in a program you must #include this header file.
pointer
unary operator
*
fstream
47. int namespace include using return examples of ___________
reserve words
#include <headerfilename>
static_cast<char>(65)
Sentinel
48. An array that uses two subscripts is referred to as a(n) _________ array.
address
function call
scope resolution operator
two-dimensional
49. The _________ begins the body of every function and the _________ ends the body of every function.
{ }
#include <headerfilename>
t
/n
50. An expression that has operands with different data types
Closing brace
register
mixed expression
n