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. Initializers __________ must be used to initialize constant members of a class.
member
data type
void
strcpy()
2. Nonexecutable statements that are included in a program to provide information about what the program does etc.
comments
arithmetic expression
private
{ }
3. Compares two strings and returns 0 if they are equal.
strcmp()
new line
globals
static_cast<char>(65)
4. For every opening brace in a C++ program there must be a ______________.
special symbols
cout
floating-point
Closing brace
5. A function that can be used to read character data including whitespace
syntax
cin.get(ch)
function call
associations
6. The ________ qualifier is used to declare read-only variables.
const
global
classes
strcpy()
7. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
pointer
0
::
fstream
8. If a member initializer is not provided for a member object of a class the object's __________ is called.
semantics
.cpp
selection
default constructor
9. A variable that holds the address of another variable.
assignment statement
initialized
special symbols
pointer
10. 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.
% modulus
inheritance
strcmp()
derived class
11. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
friend
switch
Unified Modeling Language(UML)
t
12. A constant object must be __________; it cannot be modified after it is created.
initialized
escape sequences
local variable
non-static
13. A __________ should be used to declare the size of an array because it makes the program more scalable.
dot (.)
n
operand value
constant variable
14. This manipulator causes the field to be left-justified with padding spaces printed to the right.
syntax
left
register
if...else
15. A file must be ________ before data can be written to or read from it.
semantics
opened
cin
data type
16. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
Literals
preprocessor
type casting (conversion)
char
17. Sets floating-point values to a fixed decimal format
strcpy()
fixed
*
Default memberwise assignment
18. Whole numbers - no decimals and no commas included
int values
heap
sorting
Counter-controlled or definite
19. The _________ begins the body of every function and the _________ ends the body of every function.
auto
local variable
{ }
Preprocessor
20. Keyword public is a(n) _________
fstream
linker
>>
access specifier
21. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
if...else
*
int values
loader
22. Use 2 characters to represent one
before
escape sequences
pointer
switch
23. Type casting syntax
static_cast<char>(65)
#include <headerfilename>
srand
identifiers
24. A function is invoked with a ________.
object-oriented analysis and design (OOAD)
<<
function call
linker
25. To explicitly indicate that a value is to be converted to another type
overloading
ofstream
type casting (conversion)
classes
26. A set of values together with a set of operations
data type
.cpp
Preprocessor
Default memberwise assignment
27. Creates a copy of a string.
allocating memory
ofstream
stack
strcpy()
28. Lists and tables of values can be stored in arrays or __________.
#include <headerfilename>
vectors
access specifier
object-oriented analysis and design (OOAD)
29. 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.
if...else
void
register
rand
30. A C++ statement that makes a decision is ______.
Literals
if
function parameters
static
31. Class members specified as _________ are accessible anywhere an object of the class is in scope.
escape sequences
opened
public
assignment
32. Identifier or expression that is part of the calculation to be performed
operand value
NULL
cin.get(ch)
Arithmetic Operators
33. All C++ Variables are_________.
switch
base
case sensitive
if
34. An array that uses two subscripts is referred to as a(n) _________ array.
two-dimensional
.cpp
::
reserved words
35. A filestream variable that represents the default output device
beginning
local variable
function call
cout
36. Allows the programmer to store a value in a variable
assignment statement
void
Default memberwise assignment
char
37. The ________ enables access to a global variable with the same name as a variable in the current scope.
unary scope resolution operator (::)
static_cast<char>(65)
const datatype identifier = value
derived class
38. All ______ must be declared before they are used.
default constructor
Default memberwise assignment
#include
variables
39. Used to qualify hidden names so that they can be used.
scope resolution operator
dot (.)
selection
new line
40. A sequence of operands and operators that describe a calculation to be performed
linker
endl (same as 'n')
pointer
arithmetic expression
41. Characters used to separate symbols or reserved words or identifiers and statements
searching
variables
whitespace
base
42. A __________ data member represents class-wide information.
NULL
static
preprocessor
classes
43. Associate an identifier with a memory location
classes
allocating memory
NULL
polymorphism
44. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
function parameters
*
function prototype
ofstream
45. An expression in which all operands have the same data type - result will have the same data type as operands
Counter-controlled or definite
template
<<
like-type expression
46. The process of placing the elements of an array in order is called ________ the array.
0
int values
sorting
Semicolon
47. A variable declared outside any block or function is a ________ variable.
this
overloading
token
global
48. = & | are examples of ____________.
global
special symbols
t
information hiding
49. The size & shape & color and weight of an object are considered
attributes
left
//
dot (.)
50. This manipulator is used to establish a field width for the value immediately following it.
#include
setw
/n
type casting (conversion)