SUBJECTS
|
BROWSE
|
CAREER CENTER
|
POPULAR
|
JOIN
|
LOGIN
Business Skills
|
Soft Skills
|
Basic Literacy
|
Certifications
About
|
Help
|
Privacy
|
Terms
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. This manipulator is used to establish a field width for the value immediately following it.
setw
rand
member
Literals
2. Names of things that are used in a program - can apply to variables & constants and functions
cout
access specifier
identifiers
showpoint
3. Preprocessor directive syntax
#include <headerfilename>
semantics
case sensitive
base class
4. A variable that is known only within the function in which it is defined is called a ________.
local variable
editor
comments
void
5. 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
type casting (conversion)
polymorphism
reserve words
base
6. The modulus operator (%) can be used only with __________.
opened
operand value
scope resolution operator
integer operands
7. The stream extraction operator
initialized
type casting (conversion)
case sensitive
>>
8. The process of placing the elements of an array in order is called ________ the array.
function call
endl (same as 'n')
sorting
Preprocessor
9. The ________ of an identifier is the portion of the program in which the identifier can be used.
vectors
Sentinel
scope
public
10. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
switch
type
semantics
setw
11. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
break
static
int values
char
12. The sign you use for references
cin >> variable
two-dimensional
0
&
13. An operator that can only be used with int values. result will always be an int.
like-type expression
#include
selection
% modulus
14. To explicitly indicate that a value is to be converted to another type
type casting (conversion)
left
object file
continue
15. In inheritance the ____________ is the class that supplies the inherited members.
two-dimensional
base class
fixed
const
16. The elements of an array are related by the fact that they have the same name and ___________.
binary operator
pointer
cin.get(ch)
type
17. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
strlen()
operand value
register
syntax
18. Grammar rules of the language; compiler will try to identify and locate syntax errors
srand
static
operand value
syntax
19. 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.
operator
?
virtual functions
>>
20. A filestream variable that represents the default input source
linker
data type
cin
#include <headerfilename>
21. The process of analyzing and designing a system from an object-oriented point of view is called ________.
operator overloading
cin >> variable
object-oriented analysis and design (OOAD)
selection
22. If a member initializer is not provided for a member object of a class the object's __________ is called.
source file
static
type
default constructor
23. An expression in which all operands have the same data type - result will have the same data type as operands
reserved words
attributes
like-type expression
n
24. int namespace include using return examples of ___________
reserve words
integer operands
//
allocating memory
25. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
pointer
function prototype
private
t
26. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
switch
setw
operator overloading
variable
27. 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.
static_cast<char>(65)
Sentinel
unary scope resolution operator (::)
if
28. * / % + -
heap
global
constant variable
Arithmetic Operators
29. For every opening brace in a C++ program there must be a ______________.
friend
void
Closing brace
object-oriented analysis and design (OOAD)
30. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
pointer
preprocessor
getline
subscript (or index)
31. Used to qualify hidden names so that they can be used.
source file
scope resolution operator
Preprocessor
showpoint
32. A file must be ________ before data can be written to or read from it.
unary operator
classes
initialized
opened
33. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
inline functions
fixed
&
inheritance
34. The ________ qualifier is used to declare read-only variables.
integer operands
address
auto
const
35. A function that calls itself
named constant
recursive function
strcpy()
private
36. Type casting syntax
object file
static_cast<char>(65)
associations
/n
37. Manipulator that causes the insertion point (cursor) to move to the beginning of the next line
38. Function ________ is used to produce random numbers.
stack
information hiding
rand
polymorphism
39. The ________ program combines the output of the compiler with various library functions to produce an executable image.
linker
globals
const
cin >> variable
40. A __________ should be used to declare the size of an array because it makes the program more scalable.
semicolon
constant variable
editor
::
41. Operator with two operands
binary operator
if
delete
% modulus
42. 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.
editor
continue
a.out
classes
43. A sequence of operands and operators that describe a calculation to be performed
#include <headerfilename>
<<
arithmetic expression
global
44. Whole numbers - no decimals and no commas included
overloading
cin >> variable
int values
function call
45. Executable version of program
getline
assignment
object file
prompt
46. Sets floating-point values to a fixed decimal format
cmath
fixed
recursive function
variables
47. This is used to mark the end of a complete C++ programming statement.
case sensitive
Semicolon
operator overloading
recursive function
48. The __________ operator reclaims memory previously allocated by new.
base class
delete
Sentinel
function scope
49. Every C++ program begins execution at the function _________.
main
beginning
linker
address
50. A constant object must be __________; it cannot be modified after it is created.
cin.get(ch)
initialized
#include
information hiding