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. Identifier or expression that is part of the calculation to be performed
data type
unary operator
register
operand value
2. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
local variable
return
char
access specifier
3. Allows the programmer to store a value in a variable
initialized
assignment statement
escape sequences
void
4. The sign you use for pointers
register
cout
syntax
*
5. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
case sensitive
register
% modulus
token
6. Used for function calls and local variables
endl (same as 'n')
stack
template
syntax
7. A human readable file that contains C++ program
const datatype identifier = value
source file
assignment
&
8. The process of placing the elements of an array in order is called ________ the array.
private
int values
unary scope resolution operator (::)
sorting
9. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
const
assignment
access specifier
Counter-controlled or definite
10. The stream insertion operator
<<
subscript (or index)
overloading
const
11. Manipulator that causes the insertion point (cursor) to move to the beginning of the next line
12. A filestream variable that represents the default output device
prompt
Counter-controlled or definite
function scope
cout
13. C++ programs are normally typed into a computer using a(n) ________ program.
subscript (or index)
editor
constant variable
type
14. A function is invoked with a ________.
public
const
function call
cin
15. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
overloading
recursive
editor
classes
16. A program that finds and attaches to your program the indicated libraries for compilation
preprocessor
linker
getline
strcpy()
17. When a value of one data type is implicitly (automatically) changed to another data type
type coercion
overloading
two-dimensional
semicolon
18. Operator with two operands
cin
Default memberwise assignment
operator
binary operator
19. 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
?
continue
n
20. To allow file access in a program you must #include this header file.
const datatype identifier = value
fstream
cmath
setw
21. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
ofstream
void
comments
classes
22. A type of pointer that can point at objects of any data type.
member
template
selection
void pointer
23. A filestream variable that represents the default input source
char
Stack overflow
t
cin
24. Names of things that are used in a program - can apply to variables & constants and functions
identifiers
virtual functions
preprocessor
a.out
25. The ________ statement in a called function passes the value of an expression back to the calling function.
return
classes
overloading
inline functions
26. An array that uses two subscripts is referred to as a(n) _________ array.
assignment
strlen()
two-dimensional
loader
27. The ________ of an identifier is the portion of the program in which the identifier can be used.
variables
searching
scope
operand value
28. If a member initializer is not provided for a member object of a class the object's __________ is called.
default constructor
vectors
named constant
if
29. tab
showpoint
binary operator
t
inline functions
30. A function that can be used to read character data including whitespace
cin.get(ch)
ofstream
syntax
cin >> variable
31. Used to qualify hidden names so that they can be used.
setw
integer operands
mixed expression
scope resolution operator
32. All ______ must be declared before they are used.
variables
type casting (conversion)
access specifier
preprocessor
33. In inheritance the ____________ is the class the receives the inherited members.
new line
local variable
derived class
prompt
34. Naming convention for C++ programs
.cpp
cin
void
#include
35. 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
cmath
private
function parameters
36. A function that calls itself
recursive function
public
semicolon
Semicolon
37. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
register
two-dimensional
function scope
Default memberwise assignment
38. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
local variable
*
operator overloading
main
39. 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.
.cpp
function prototype
continue
attributes
40. Message displayed to the screen asking user for input; generated with an output statement
this
prompt
linker
two-dimensional
41. The ________ enables access to a global variable with the same name as a variable in the current scope.
cin
loader
cin >> variable
unary scope resolution operator (::)
42. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
Preprocessor
friend
definition
selection
43. For every opening brace in a C++ program there must be a ______________.
public
editor
assignment
Closing brace
44. An operator that can only be used with int values. result will always be an int.
Closing brace
Stack overflow
% modulus
int values
45. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
stack
Arithmetic Operators
break
strcpy()
46. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
recursive
beginning
assignment statement
mixed expression
47. The only integer that can be assigned directly to a pointer is_____________.
reserve words
main
0
?
48. Compares two strings and returns 0 if they are equal.
strcmp()
reserve words
recursive
getline
49. A file must be ________ before data can be written to or read from it.
opened
heap
n
Closing brace
50. A function ________ enables a single function to be defined to perform a task on many different data types.
template
prompt
variable
{ }