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. 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
2. To allow file access in a program you must #include this header file.
fstream
floating-point
subscript (or index)
virtual functions
3. Names of things that are used in a program - can apply to variables & constants and functions
static
operand value
Stack overflow
identifiers
4. 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.
static
case sensitive
const
local variable
5. A function ________ enables a single function to be defined to perform a task on many different data types.
comments
break
template
Stack overflow
6. Returns the length of a string excluding the null terminator.
strlen()
void pointer
//
classes
7. Operator with two operands
binary operator
continue
integer operands
private
8. All C++ Variables are_________.
setw
case sensitive
scope resolution operator
assignment statement
9. A constant object must be __________; it cannot be modified after it is created.
public
overloading
this
initialized
10. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
Sentinel
void pointer
named constant
srand
11. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
pointer
register
floating-point
subscript (or index)
12. The ________ qualifier is used to declare read-only variables.
setw
allocating memory
static
const
13. The stream extraction operator
>>
two-dimensional
binary operator
selection
14. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
inline functions
void
vectors
Default memberwise assignment
15. 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
two-dimensional
case sensitive
public
16. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
vectors
dot (.)
//
integer operands
17. int namespace include using return examples of ___________
switch
linker
member
reserve words
18. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
arithmetic expression
void
sorting
special symbols
19. Use 2 characters to represent one
cin
Stack overflow
escape sequences
main
20. This is used to mark the end of a complete C++ programming statement.
Semicolon
overloading
syntax
comments
21. Nonexecutable statements that are included in a program to provide information about what the program does etc.
main
comments
recursive function
static_cast<char>(65)
22. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
>>
function parameters
opened
return
23. The modulus operator (%) can be used only with __________.
//
assignment
integer operands
fstream
24. The __________ operator reclaims memory previously allocated by new.
% modulus
attributes
type
delete
25. 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
base
named constant
register
?
26. A file must be ________ before data can be written to or read from it.
cout
associations
opened
token
27. This manipulator causes the field to be left-justified with padding spaces printed to the right.
left
heap
address
cin >> variable
28. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
preprocessor
type coercion
pointer
switch
29. Words that are used for special purposes in a program
loader
initialized
friend
reserved words
30. tab
searching
t
#include
void
31. The storage-class specifiers are mutable - auto - ________ - extern and static.
Closing brace
NULL
#include
register
32. In inheritance the ____________ is the class that supplies the inherited members.
assignment statement
base class
setw
int values
33. Function ________ is used to set the random number seed to randomize a program.
cout
srand
const datatype identifier = value
assignment
34. Allows the programmer to store a value in a variable
assignment statement
Preprocessor
linker
auto
35. 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.
/n
type coercion
data type
left
36. A type of pointer that can point at objects of any data type.
const
classes
type coercion
void pointer
37. An expression that has operands with different data types
mixed expression
register
special symbols
non-static
38. * / % + -
Arithmetic Operators
pointer
sorting
srand
39. A function that calls itself
return
recursive function
type coercion
const
40. 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
strcmp()
?
Counter-controlled or definite
41. Associate an identifier with a memory location
Sentinel
allocating memory
#include
preprocessor
42. You must have a ___________ for every variable you intend to use in a program
dot (.)
definition
operator overloading
polymorphism
43. An array that uses two subscripts is referred to as a(n) _________ array.
getline
selection
reserve words
two-dimensional
44. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
const
scope resolution operator
if...else
semantics
45. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
unary scope resolution operator (::)
virtual functions
char
#include
46. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
classes
break
const
derived class
47. 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.
pointer
reserved words
Sentinel
register
48. C++ programs are normally typed into a computer using a(n) ________ program.
vectors
<<
editor
rand
49. A C++ statement that makes a decision is ______.
if
rand
global
stack
50. Sets floating-point values to a fixed decimal format
globals
fixed
return
unary scope resolution operator (::)