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. Use 2 characters to represent one
escape sequences
variables
floating-point
selection
2. For every opening brace in a C++ program there must be a ______________.
switch
cin
Closing brace
static
3. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
cin
&
operator overloading
private
4. A sequence of operands and operators that describe a calculation to be performed
pointer
arithmetic expression
char
operator overloading
5. A human readable file that contains C++ program
static
return
source file
Arithmetic Operators
6. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
Counter-controlled or definite
whitespace
inheritance
recursive
7. The __________ operator reclaims memory previously allocated by new.
delete
setw
cmath
strlen()
8. To allow file access in a program you must #include this header file.
fstream
variable
this
preprocessor
9. A filestream variable that represents the default output device
{ }
continue
cout
template
10. int namespace include using return examples of ___________
reserve words
pointer
semantics
constant variable
11. When a value of one data type is implicitly (automatically) changed to another data type
type coercion
information hiding
vectors
n
12. To write data to a file you define an object of which one of the following
virtual functions
reserved words
ofstream
beginning
13. Classes can have relationships with other classes. These relationships are called ________.
associations
function call
int values
preprocessor
14. A member function should be declared static if it does not access __________ class members.
non-static
cin
sorting
mixed expression
15. Program components in C++ are called functions and ________.
void pointer
classes
function prototype
reserved words
16. Syntax for named constant declaration
inline functions
break
const datatype identifier = value
operator overloading
17. The elements of an array are related by the fact that they have the same name and ___________.
assignment
register
type
inline functions
18. A set of values together with a set of operations
comments
reserve words
data type
opened
19. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
Stack overflow
return
like-type expression
endl (same as 'n')
20. In inheritance the ____________ is the class the receives the inherited members.
.cpp
cout
derived class
fixed
21. The sign you use for references
assignment statement
type coercion
&
/n
22. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
operator
new line
friend
showpoint
23. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
object file
if...else
base class
<<
24. The process of placing the elements of an array in order is called ________ the array.
% modulus
comments
sorting
<<
25. An operator that can only be used with int values. result will always be an int.
linker
% modulus
int values
inheritance
26. 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.
function overloading
private
continue
subscript (or index)
27. tab
strlen()
t
linker
inheritance
28. = & | are examples of ____________.
a.out
reserve words
loader
special symbols
29. The ________ program combines the output of the compiler with various library functions to produce an executable image.
const
Default memberwise assignment
Closing brace
linker
30. To explicitly indicate that a value is to be converted to another type
loader
const datatype identifier = value
NULL
type casting (conversion)
31. Initializers __________ must be used to initialize constant members of a class.
default constructor
integer operands
&
member
32. Function ________ is used to set the random number seed to randomize a program.
classes
srand
recursive
base class
33. data types that refer to numbers with decimals
before
classes
floating-point
special symbols
34. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
default constructor
Stack overflow
vectors
const
35. Whole numbers - no decimals and no commas included
operand value
int values
variable
before
36. Header file that contains commonly performed mathematical functions
cmath
const datatype identifier = value
n
case sensitive
37. A function is invoked with a ________.
escape sequences
derived class
binary operator
function call
38. The ________ program transfers the executable image of a C++ program from disk to memory.
loader
strlen()
t
recursive
39. This is used to mark the end of a complete C++ programming statement.
named constant
const datatype identifier = value
Semicolon
public
40. Forces the computer to display decimal point and trailing zeroes
arithmetic expression
unary operator
showpoint
beginning
41. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
//
preprocessor
cin >> variable
default constructor
42. Grammar rules of the language; compiler will try to identify and locate syntax errors
function prototype
semicolon
syntax
.cpp
43. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
like-type expression
#include
const
>>
44. This manipulator is used to establish a field width for the value immediately following it.
subscript (or index)
setw
#include <headerfilename>
Default memberwise assignment
45. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
register
>>
floating-point
identifiers
46. Allows the programmer to store a value in a variable
assignment statement
0
sorting
polymorphism
47. An expression that has operands with different data types
mixed expression
special symbols
variable
cin
48. The three values that can be used to initialize a pointer are 0 - __________ and an address.
return
#include directive
NULL
const
49. A filestream variable that represents the default input source
showpoint
left
cin
auto
50. Most calculations are normally performed by ______ statements.
assignment
reserved words
rand
this