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. Operator with only one operand
% modulus
left
char
unary operator
2. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
this
assignment
prompt
variable
3. A member function should be declared static if it does not access __________ class members.
% modulus
fstream
recursive
non-static
4. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
const
classes
semantics
variable
5. The process of determining if an array contains a particular key value is called _________ the array.
selection
scope resolution operator
overloading
searching
6. Lists and tables of values can be stored in arrays or __________.
searching
Semicolon
vectors
object-oriented analysis and design (OOAD)
7. Every C++ program begins execution at the function _________.
variable
main
{ }
local variable
8. Words that are used for special purposes in a program
auto
strcmp()
reserved words
ofstream
9. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
strcmp()
auto
cmath
floating-point
10. The storage-class specifiers are mutable - auto - ________ - extern and static.
rand
semantics
register
strlen()
11. For every opening brace in a C++ program there must be a ______________.
&
Closing brace
unary operator
strlen()
12. The idea that you can call the same function and the output will depend on the type of object you're using.
preprocessor
left
cin.get(ch)
polymorphism
13. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
showpoint
register
global
scope
14. The conditional operator. it evaluates a line of code and returns one thing if the condition is true and a different thing if the condition is false.
preprocessor
rand
?
const datatype identifier = value
15. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
sorting
strcmp()
t
break
16. newline
n
Counter-controlled or definite
main
% modulus
17. Class members specified as _________ are accessible anywhere an object of the class is in scope.
public
source file
opened
definition
18. A variable that is known only within the function in which it is defined is called a ________.
local variable
if
strcpy()
floating-point
19. A __________ data member represents class-wide information.
access specifier
before
unary operator
static
20. Program components in C++ are called functions and ________.
classes
&
global
this
21. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
overloading
floating-point
int values
return
22. directive A statement that starts with a # is called a ____________.
member
showpoint
Preprocessor
two-dimensional
23. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
Literals
operator overloading
function scope
Sentinel
24. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
0
//
unary scope resolution operator (::)
srand
25. The __________ operator reclaims memory previously allocated by new.
delete
preprocessor
cin >> variable
static
26. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
const
Counter-controlled or definite
Unified Modeling Language(UML)
strcpy()
27. The ________ of an identifier is the portion of the program in which the identifier can be used.
&
case sensitive
Preprocessor
scope
28. You can declare default values for a function in the ____________________.
reserved words
loader
function parameters
token
29. 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 class
pointer
selection
base
30. An expression that has operands with different data types
mixed expression
template
operator
&
31. __________ can be used to assign an object of a class to another object of the same class.
this
Default memberwise assignment
#include <headerfilename>
Closing brace
32. Grammar rules of the language; compiler will try to identify and locate syntax errors
scope resolution operator
local variable
syntax
integer operands
33. A pointer is a variable that contains as its value the____________ of another variable.
address
::
semicolon
pointer
34. 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.
vectors
virtual functions
void pointer
static
35. Forces the computer to display decimal point and trailing zeroes
showpoint
main
special symbols
% modulus
36. The ________ enables access to a global variable with the same name as a variable in the current scope.
sorting
function overloading
unary scope resolution operator (::)
floating-point
37. Two slash marks ( // ) indicate __________ of a comment
const
beginning
rand
derived class
38. The stream insertion operator
<<
mixed expression
type
preprocessor
39. Symbol that denotes an action to be performed
Default memberwise assignment
base
operator
access specifier
40. Names of things that are used in a program - can apply to variables & constants and functions
comments
identifiers
srand
auto
41. A filestream variable that represents the default output device
non-static
cout
reserved words
binary operator
42. An array that uses two subscripts is referred to as a(n) _________ array.
auto
overloading
two-dimensional
reserved words
43. Operator with two operands
binary operator
function scope
unary scope resolution operator (::)
information hiding
44. Returns the length of a string excluding the null terminator.
{ }
strlen()
n
t
45. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
type
if...else
if
Preprocessor
46. The three values that can be used to initialize a pointer are 0 - __________ and an address.
object-oriented analysis and design (OOAD)
syntax
named constant
NULL
47. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
classes
reserved words
overloading
fstream
48. Preprocessor directive syntax
escape sequences
#include <headerfilename>
pointer
like-type expression
49. These are data items whose values do not change while the program is running
preprocessor
Literals
setw
Arithmetic Operators
50. 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.
0
n
endl (same as 'n')
Sentinel