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. Whole numbers - no decimals and no commas included
fixed
int values
like-type expression
constant variable
2. A filestream variable that represents the default input source
reserve words
cout
cin
attributes
3. Class members are accessed via the ________ operator in conjunction with the name of an object (or reference to an object) of the class or via the arrow (->) operator in conjunction with a pointer to an object of the class.
dot (.)
cmath
t
static
4. The number used to refer to a particular element of an array is called its ________.
Default memberwise assignment
selection
operator overloading
subscript (or index)
5. Returns the length of a string excluding the null terminator.
vectors
auto
strlen()
pointer
6. Used for dynamically allocated variables
% modulus
register
strlen()
heap
7. A __________ should be used to declare the size of an array because it makes the program more scalable.
Semicolon
information hiding
constant variable
recursive
8. A ________ program executes before the compiler's translation phase begins.
member
preprocessor
definition
prompt
9. Creates a copy of a string.
strcpy()
#include directive
scope
friend
10. An expression that has operands with different data types
mixed expression
polymorphism
operand value
cmath
11. All ______ must be declared before they are used.
unary scope resolution operator (::)
Preprocessor
0
variables
12. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
vectors
unary scope resolution operator (::)
break
stack
13. Function ________ is used to set the random number seed to randomize a program.
/n
cin
srand
attributes
14. The address-of operator. it is used to assign pointers and to print the address of variables.
&
.cpp
continue
::
15. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
Stack overflow
ofstream
setw
inheritance
16. The size & shape & color and weight of an object are considered
attributes
cmath
reserve words
operator overloading
17. 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
stack
object file
integer operands
18. If a member initializer is not provided for a member object of a class the object's __________ is called.
setw
source file
default constructor
endl (same as 'n')
19. This manipulator causes the field to be left-justified with padding spaces printed to the right.
left
delete
pointer
preprocessor
20. The ________ program transfers the executable image of a C++ program from disk to memory.
loader
.cpp
Default memberwise assignment
inline functions
21. To write data to a file you define an object of which one of the following
const
vectors
ofstream
beginning
22. The process of placing the elements of an array in order is called ________ the array.
delete
pointer
sorting
case sensitive
23. A pointer is a variable that contains as its value the____________ of another variable.
new line
static_cast<char>(65)
address
Sentinel
24. The _________ begins the body of every function and the _________ ends the body of every function.
main
object-oriented analysis and design (OOAD)
{ }
overloading
25. An expression in which all operands have the same data type - result will have the same data type as operands
non-static
srand
like-type expression
polymorphism
26. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
::
static
constant variable
Unified Modeling Language(UML)
27. Identifier or expression that is part of the calculation to be performed
public
operand value
function parameters
function prototype
28. Every C++ statement ends with a(n) _________.
initialized
function prototype
two-dimensional
semicolon
29. Type casting syntax
static_cast<char>(65)
endl (same as 'n')
operator overloading
editor
30. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
loader
char
object-oriented analysis and design (OOAD)
const
31. Sets floating-point values to a fixed decimal format
cin >> variable
Literals
virtual functions
fixed
32. The storage-class specifiers are mutable - auto - ________ - extern and static.
if
polymorphism
delete
register
33. The idea that you can call the same function and the output will depend on the type of object you're using.
polymorphism
two-dimensional
scope resolution operator
static
34. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
int values
selection
Stack overflow
semantics
35. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
preprocessor
data type
if...else
this
36. The ________ program combines the output of the compiler with various library functions to produce an executable image.
subscript (or index)
Counter-controlled or definite
Closing brace
linker
37. This manipulator is used to establish a field width for the value immediately following it.
setw
linker
.cpp
polymorphism
38. Allows the programmer to store a value in a variable
setw
assignment statement
binary operator
>>
39. 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.
scope
const datatype identifier = value
integer operands
inheritance
40. Characters used to separate symbols or reserved words or identifiers and statements
register
base class
floating-point
whitespace
41. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
register
unary scope resolution operator (::)
operator overloading
named constant
42. A human readable file that contains C++ program
t
initialized
cin
source file
43. Used to qualify hidden names so that they can be used.
register
return
scope resolution operator
showpoint
44. The stream insertion operator
a.out
<<
access specifier
integer operands
45. The stream extraction operator
>>
function scope
?
fixed
46. An operator that can only be used with int values. result will always be an int.
{ }
private
searching
% modulus
47. A __________ data member represents class-wide information.
NULL
inheritance
static
return
48. When a value of one data type is implicitly (automatically) changed to another data type
Literals
type coercion
public
unary scope resolution operator (::)
49. For every opening brace in a C++ program there must be a ______________.
assignment statement
Closing brace
n
attributes
50. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
?
cin >> variable
register
like-type expression