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. The process of placing the elements of an array in order is called ________ the array.
cmath
unary scope resolution operator (::)
identifiers
sorting
2. C++ programs are normally typed into a computer using a(n) ________ program.
object-oriented analysis and design (OOAD)
showpoint
?
editor
3. Identifier or expression that is part of the calculation to be performed
Literals
operand value
*
variables
4. Program components in C++ are called functions and ________.
access specifier
initialized
classes
unary scope resolution operator (::)
5. Compares two strings and returns 0 if they are equal.
operator overloading
object file
linker
strcmp()
6. Preprocessor directive syntax
#include <headerfilename>
inline functions
left
access specifier
7. __________ can be used to assign an object of a class to another object of the same class.
like-type expression
if
Default memberwise assignment
getline
8. 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
<<
comments
base
pointer
9. This manipulator is used to establish a field width for the value immediately following it.
setw
private
delete
stack
10. Function ________ is used to produce random numbers.
strcmp()
cin
rand
0
11. Grammar rules of the language; compiler will try to identify and locate syntax errors
recursive
member
syntax
>>
12. The __________ operator reclaims memory previously allocated by new.
delete
int values
address
break
13. OOD also takes advantage of ________ relationships where new classes of objects are derived by absorbing characteristics of existing classes - then adding unique characteristics of their own.
*
inheritance
recursive function
const datatype identifier = value
14. Associate an identifier with a memory location
unary scope resolution operator (::)
editor
cin.get(ch)
allocating memory
15. = & | are examples of ____________.
endl (same as 'n')
NULL
special symbols
definition
16. In inheritance the ____________ is the class the receives the inherited members.
new line
//
derived class
syntax
17. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
private
dot (.)
function overloading
function call
18. Two slash marks ( // ) indicate __________ of a comment
ofstream
beginning
definition
Default memberwise assignment
19. 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.
strlen()
.cpp
opened
Sentinel
20. 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.
Unified Modeling Language(UML)
void
scope resolution operator
like-type expression
21. A pointer is a variable that contains as its value the____________ of another variable.
scope resolution operator
inline functions
sorting
address
22. Use 2 characters to represent one
floating-point
escape sequences
operand value
default constructor
23. data types that refer to numbers with decimals
::
assignment
floating-point
two-dimensional
24. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
#include directive
cin.get(ch)
if...else
.cpp
25. Used to qualify hidden names so that they can be used.
scope resolution operator
access specifier
showpoint
Sentinel
26. Used for function calls and local variables
stack
arithmetic expression
dot (.)
type casting (conversion)
27. The process of analyzing and designing a system from an object-oriented point of view is called ________.
Closing brace
object-oriented analysis and design (OOAD)
int values
token
28. 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.
address
base
static
virtual functions
29. The only integer that can be assigned directly to a pointer is_____________.
0
const datatype identifier = value
function prototype
before
30. A ________ program executes before the compiler's translation phase begins.
preprocessor
assignment statement
function overloading
/n
31. The elements of an array are related by the fact that they have the same name and ___________.
local variable
information hiding
cmath
type
32. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
heap
cin >> variable
?
rand
33. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
private
special symbols
object-oriented analysis and design (OOAD)
% modulus
34. Operator with two operands
void
named constant
pointer
binary operator
35. The number used to refer to a particular element of an array is called its ________.
subscript (or index)
main
attributes
Arithmetic Operators
36. Forces the computer to display decimal point and trailing zeroes
Stack overflow
default constructor
local variable
showpoint
37. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
semantics
operator overloading
void
operand value
38. To write data to a file you define an object of which one of the following
polymorphism
?
ofstream
cin
39. 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.
overloading
/n
#include <headerfilename>
address
40. Classes can have relationships with other classes. These relationships are called ________.
continue
address
const
associations
41. The sign you use for pointers
cout
*
loader
access specifier
42. To allow file access in a program you must #include this header file.
friend
fstream
fixed
selection
43. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
recursive
new line
mixed expression
function scope
44. Message displayed to the screen asking user for input; generated with an output statement
operand value
semantics
prompt
sorting
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.
rand
preprocessor
break
type coercion
46. To explicitly indicate that a value is to be converted to another type
syntax
selection
type casting (conversion)
private
47. int namespace include using return examples of ___________
reserve words
arithmetic expression
variables
n
48. A function that can be used to read character data including whitespace
{ }
information hiding
left
cin.get(ch)
49. Sets floating-point values to a fixed decimal format
object-oriented analysis and design (OOAD)
fixed
function call
heap
50. The modulus operator (%) can be used only with __________.
integer operands
strcpy()
cmath
linker