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. 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.
register
whitespace
sorting
continue
2. Function ________ is used to set the random number seed to randomize a program.
scope
srand
left
object-oriented analysis and design (OOAD)
3. The ________ program combines the output of the compiler with various library functions to produce an executable image.
preprocessor
operator overloading
private
linker
4. A set of values together with a set of operations
special symbols
inheritance
data type
assignment
5. A file must be ________ before data can be written to or read from it.
arithmetic expression
selection
opened
vectors
6. A sequence of operands and operators that describe a calculation to be performed
source file
arithmetic expression
pointer
local variable
7. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
auto
Arithmetic Operators
pointer
new line
8. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
sorting
selection
globals
reserved words
9. The process of determining if an array contains a particular key value is called _________ the array.
mixed expression
searching
Closing brace
char
10. newline
setw
n
function parameters
auto
11. The only integer that can be assigned directly to a pointer is_____________.
return
0
register
local variable
12. Used for function calls and local variables
function prototype
stack
object file
auto
13. All ______ must be declared before they are used.
strcmp()
const
operand value
variables
14. Classes can have relationships with other classes. These relationships are called ________.
template
associations
member
setw
15. Preprocessor directive syntax
dot (.)
classes
assignment
#include <headerfilename>
16. A __________ data member represents class-wide information.
#include
initialized
static
<<
17. Message displayed to the screen asking user for input; generated with an output statement
before
function overloading
assignment
prompt
18. The ________ program transfers the executable image of a C++ program from disk to memory.
if...else
int values
loader
void
19. Associate an identifier with a memory location
scope resolution operator
allocating memory
cmath
cin.get(ch)
20. int namespace include using return examples of ___________
stack
subscript (or index)
Counter-controlled or definite
reserve words
21. 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.
continue
virtual functions
preprocessor
if...else
22. A type of pointer that can point at objects of any data type.
const
void pointer
Counter-controlled or definite
scope resolution operator
23. The ________ statement in a called function passes the value of an expression back to the calling function.
source file
Sentinel
return
Preprocessor
24. Lists and tables of values can be stored in arrays or __________.
delete
vectors
stack
prompt
25. Sets floating-point values to a fixed decimal format
static
local variable
cmath
fixed
26. These are data items whose values do not change while the program is running
type
Literals
>>
Sentinel
27. This manipulator is used to establish a field width for the value immediately following it.
setw
n
linker
definition
28. A function that calls itself
type
% modulus
{ }
recursive function
29. The stream insertion operator
if
<<
private
unary scope resolution operator (::)
30. Initializers __________ must be used to initialize constant members of a class.
type
strcpy()
member
loader
31. Executable version of program
constant variable
reserved words
object file
static_cast<char>(65)
32. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
const
friend
const datatype identifier = value
named constant
33. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
new line
this
fstream
//
34. Member objects are constructed __________ their enclosing class object.
function prototype
reserved words
if...else
before
35. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
Stack overflow
Preprocessor
return
non-static
36. Returns the length of a string excluding the null terminator.
searching
cout
named constant
strlen()
37. You can declare default values for a function in the ____________________.
delete
const
fixed
function parameters
38. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
#include
function call
function scope
friend
39. 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.
derived class
static_cast<char>(65)
fstream
dot (.)
40. Two slash marks ( // ) indicate __________ of a comment
beginning
int values
n
data type
41. 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.
local variable
special symbols
Preprocessor
inheritance
42. A C++ statement that makes a decision is ______.
/n
reserved words
if
two-dimensional
43. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
0
*
initialized
friend
44. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
mixed expression
sorting
Counter-controlled or definite
const
45. Type casting syntax
object-oriented analysis and design (OOAD)
private
static_cast<char>(65)
t
46. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
getline
function overloading
const
return
47. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
derived class
endl (same as 'n')
recursive
0
48. The ________ enables access to a global variable with the same name as a variable in the current scope.
Default memberwise assignment
*
function call
unary scope resolution operator (::)
49. A filestream variable that represents the default input source
object file
cin
new line
srand
50. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
new line
classes
//
integer operands