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. Function ________ is used to produce random numbers.
0
rand
reserved words
register
2. Operator with only one operand
unary operator
pointer
showpoint
cmath
3. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
auto
definition
a.out
char
4. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
const
like-type expression
&
prompt
5. The stream extraction operator
Semicolon
>>
&
friend
6. Returns the length of a string excluding the null terminator.
access specifier
?
strlen()
linker
7. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
cin >> variable
delete
fstream
reserve words
8. 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.
constant variable
base
t
?
9. 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.
void
function call
*
srand
10. An array that uses two subscripts is referred to as a(n) _________ array.
return
unary scope resolution operator (::)
two-dimensional
loader
11. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
endl (same as 'n')
0
function scope
new line
12. The number used to refer to a particular element of an array is called its ________.
case sensitive
subscript (or index)
continue
pointer
13. The stream insertion operator
<<
NULL
preprocessor
unary scope resolution operator (::)
14. The process of analyzing and designing a system from an object-oriented point of view is called ________.
//
identifiers
dot (.)
object-oriented analysis and design (OOAD)
15. In inheritance the ____________ is the class that supplies the inherited members.
operand value
% modulus
operator
base class
16. 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.
unary scope resolution operator (::)
base class
/n
friend
17. The process of placing the elements of an array in order is called ________ the array.
sorting
register
#include directive
&
18. 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.
Sentinel
private
base class
preprocessor
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.
void
static
virtual functions
identifiers
20. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
type coercion
inline functions
type casting (conversion)
return
21. Used to qualify hidden names so that they can be used.
polymorphism
scope resolution operator
assignment
strlen()
22. data types that refer to numbers with decimals
Closing brace
floating-point
Stack overflow
delete
23. The _____ causes the contents of another file to be inserted into a program.
vectors
floating-point
n
#include directive
24. A filestream variable that represents the default output device
arithmetic expression
cout
if...else
?
25. int namespace include using return examples of ___________
left
reserve words
rand
>>
26. The three values that can be used to initialize a pointer are 0 - __________ and an address.
default constructor
arithmetic expression
NULL
semicolon
27. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
const
Stack overflow
assignment statement
two-dimensional
28. The storage-class specifiers are mutable - auto - ________ - extern and static.
non-static
register
::
dot (.)
29. Operator with two operands
a.out
% modulus
pointer
binary operator
30. A variable that holds the address of another variable.
Closing brace
static
operator overloading
pointer
31. If a member initializer is not provided for a member object of a class the object's __________ is called.
default constructor
Default memberwise assignment
initialized
Unified Modeling Language(UML)
32. Creates a copy of a string.
delete
srand
strcpy()
return
33. Grammar rules of the language; compiler will try to identify and locate syntax errors
syntax
register
static
loader
34. You can declare default values for a function in the ____________________.
Closing brace
function parameters
preprocessor
public
35. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
register
operator
named constant
access specifier
36. Preprocessor directive syntax
n
unary scope resolution operator (::)
semantics
#include <headerfilename>
37. An expression in which all operands have the same data type - result will have the same data type as operands
semicolon
like-type expression
% modulus
inheritance
38. Syntax for named constant declaration
special symbols
whitespace
before
const datatype identifier = value
39. newline
selection
cin.get(ch)
n
prompt
40. C++ programs are normally typed into a computer using a(n) ________ program.
switch
return
editor
before
41. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
operator overloading
scope
Counter-controlled or definite
Semicolon
42. Member objects are constructed __________ their enclosing class object.
integer operands
vectors
before
function call
43. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
information hiding
cin.get(ch)
this
integer operands
44. The modulus operator (%) can be used only with __________.
overloading
address
0
integer operands
45. A memory location with a name and data type - its content may be changed during program execution
public
beginning
variable
cin
46. A ________ program executes before the compiler's translation phase begins.
*
srand
endl (same as 'n')
preprocessor
47. Compares two strings and returns 0 if they are equal.
t
Closing brace
static
strcmp()
48. An operator that can only be used with int values. result will always be an int.
type coercion
*
% modulus
sorting
49. The size & shape & color and weight of an object are considered
cout
t
left
attributes
50. = & | are examples of ____________.
associations
cout
strcpy()
special symbols