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 stream insertion operator
<<
const
non-static
unary operator
2. A __________ should be used to declare the size of an array because it makes the program more scalable.
classes
&
Stack overflow
constant variable
3. A filestream variable that represents the default output device
cin.get(ch)
fstream
cout
editor
4. Returns the length of a string excluding the null terminator.
pointer
editor
access specifier
strlen()
5. This manipulator is used to establish a field width for the value immediately following it.
ofstream
char
setw
special symbols
6. The ________ of an identifier is the portion of the program in which the identifier can be used.
srand
endl (same as 'n')
definition
scope
7. Function ________ is used to set the random number seed to randomize a program.
srand
sorting
initialized
type casting (conversion)
8. The modulus operator (%) can be used only with __________.
integer operands
attributes
cin
void
9. Operator with only one operand
&
template
unary operator
object file
10. A function is invoked with a ________.
fixed
static
function call
two-dimensional
11. In inheritance the ____________ is the class the receives the inherited members.
Closing brace
derived class
#include <headerfilename>
if
12. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
base
floating-point
#include
delete
13. = & | are examples of ____________.
delete
data type
escape sequences
special symbols
14. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
Arithmetic Operators
information hiding
char
case sensitive
15. To write data to a file you define an object of which one of the following
variable
ofstream
unary scope resolution operator (::)
>>
16. Sets floating-point values to a fixed decimal format
two-dimensional
default constructor
fixed
/n
17. A pointer is a variable that contains as its value the____________ of another variable.
Stack overflow
strcpy()
address
void
18. data types that refer to numbers with decimals
floating-point
stack
endl (same as 'n')
#include
19. The number used to refer to a particular element of an array is called its ________.
type
derived class
dot (.)
subscript (or index)
20. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
Stack overflow
function prototype
like-type expression
this
21. Nonexecutable statements that are included in a program to provide information about what the program does etc.
integer operands
continue
comments
setw
22. The sign you use for pointers
attributes
*
static
case sensitive
23. A type of pointer that can point at objects of any data type.
t
operand value
void pointer
function prototype
24. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
recursive function
sorting
ofstream
register
25. The _____ causes the contents of another file to be inserted into a program.
#include directive
object file
scope
static_cast<char>(65)
26. Grammar rules of the language; compiler will try to identify and locate syntax errors
escape sequences
operator
syntax
return
27. newline
semantics
binary operator
n
Sentinel
28. An array that uses two subscripts is referred to as a(n) _________ array.
semantics
whitespace
two-dimensional
?
29. Words that are used for special purposes in a program
reserved words
Counter-controlled or definite
ofstream
function scope
30. All C++ Variables are_________.
constant variable
syntax
case sensitive
*
31. Class members specified as _________ are accessible anywhere an object of the class is in scope.
fixed
Unified Modeling Language(UML)
operator overloading
public
32. 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.
NULL
return
/n
prompt
33. An expression in which all operands have the same data type - result will have the same data type as operands
like-type expression
editor
preprocessor
strcpy()
34. The ________ program combines the output of the compiler with various library functions to produce an executable image.
sorting
linker
before
variable
35. A variable that holds the address of another variable.
pointer
*
searching
opened
36. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
private
Semicolon
static_cast<char>(65)
like-type expression
37. To allow file access in a program you must #include this header file.
Semicolon
attributes
fstream
global
38. Symbol that denotes an action to be performed
operator
pointer
new line
editor
39. A function that calls itself
recursive function
>>
base
endl (same as 'n')
40. The _________ begins the body of every function and the _________ ends the body of every function.
operator
integer operands
{ }
base
41. Header file that contains commonly performed mathematical functions
cmath
template
assignment statement
comments
42. Executable version of program
address
classes
private
object file
43. An expression that has operands with different data types
syntax
fstream
base
mixed expression
44. 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
local variable
base
private
binary operator
45. The ________ qualifier is used to declare read-only variables.
const
globals
vectors
this
46. __________ can be used to assign an object of a class to another object of the same class.
Default memberwise assignment
preprocessor
named constant
if...else
47. 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
t
loader
constant variable
48. 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.
register
polymorphism
dot (.)
reserved words
49. tab
void pointer
base
Preprocessor
t
50. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
this
return
if
Unified Modeling Language(UML)