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. A file must be ________ before data can be written to or read from it.
reserve words
operand value
opened
delete
2. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
void
return
scope
{ }
3. The three values that can be used to initialize a pointer are 0 - __________ and an address.
break
NULL
pointer
Preprocessor
4. tab
const
t
void pointer
delete
5. Every C++ statement ends with a(n) _________.
semicolon
&
pointer
0
6. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
identifiers
searching
function scope
reserve words
7. Whole numbers - no decimals and no commas included
global
function parameters
int values
type casting (conversion)
8. A ________ program executes before the compiler's translation phase begins.
preprocessor
pointer
srand
globals
9. 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
10. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
Closing brace
base
t
cin >> variable
11. The stream insertion operator
{ }
operator
opened
<<
12. A human readable file that contains C++ program
source file
void pointer
token
recursive function
13. The storage-class specifiers are mutable - auto - ________ - extern and static.
register
non-static
break
assignment
14. Used for dynamically allocated variables
heap
subscript (or index)
data type
char
15. This manipulator causes the field to be left-justified with padding spaces printed to the right.
left
unary operator
linker
#include <headerfilename>
16. A variable that holds the address of another variable.
pointer
source file
base class
scope
17. A pointer is a variable that contains as its value the____________ of another variable.
fixed
address
Literals
reserved words
18. Header file that contains commonly performed mathematical functions
non-static
cmath
address
this
19. An expression that has operands with different data types
mixed expression
setw
derived class
escape sequences
20. 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.
virtual functions
&
named constant
syntax
21. directive A statement that starts with a # is called a ____________.
inline functions
?
ofstream
Preprocessor
22. A filestream variable that represents the default input source
Default memberwise assignment
cin
operator overloading
&
23. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
source file
reserved words
NULL
break
24. To allow file access in a program you must #include this header file.
fstream
type coercion
Default memberwise assignment
fixed
25. Words that are used for special purposes in a program
reserved words
auto
function scope
initialized
26. data types that refer to numbers with decimals
floating-point
before
dot (.)
Default memberwise assignment
27. Sets floating-point values to a fixed decimal format
heap
comments
rand
fixed
28. An expression in which all operands have the same data type - result will have the same data type as operands
t
const datatype identifier = value
Unified Modeling Language(UML)
like-type expression
29. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
syntax
classes
semantics
return
30. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
strcpy()
setw
function prototype
static
31. Characters used to separate symbols or reserved words or identifiers and statements
comments
return
overloading
whitespace
32. 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.
void
syntax
main
if...else
33. Names of things that are used in a program - can apply to variables & constants and functions
editor
identifiers
object-oriented analysis and design (OOAD)
left
34. The ________ statement in a called function passes the value of an expression back to the calling function.
default constructor
return
continue
if
35. Syntax for named constant declaration
srand
const datatype identifier = value
selection
operator
36. Use 2 characters to represent one
variables
initialized
pointer
escape sequences
37. A memory location with a name and data type - its content may be changed during program execution
inheritance
allocating memory
variable
cout
38. Function ________ is used to set the random number seed to randomize a program.
srand
function call
like-type expression
source file
39. 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
semicolon
friend
prompt
40. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
access specifier
char
beginning
operand value
41. Associate an identifier with a memory location
function overloading
syntax
allocating memory
main
42. Initializers __________ must be used to initialize constant members of a class.
Literals
polymorphism
member
reserve words
43. A C++ statement that makes a decision is ______.
operator
if
unary operator
source file
44. Symbol that denotes an action to be performed
operator
NULL
switch
<<
45. A function that calls itself
this
function prototype
syntax
recursive function
46. A __________ data member represents class-wide information.
like-type expression
unary scope resolution operator (::)
static
arithmetic expression
47. Default name of executable file
mixed expression
a.out
Default memberwise assignment
classes
48. Identifier or expression that is part of the calculation to be performed
syntax
operand value
>>
::
49. __________ can be used to assign an object of a class to another object of the same class.
classes
0
Default memberwise assignment
opened
50. The ________ of an identifier is the portion of the program in which the identifier can be used.
type
stack
scope
data type