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 sign you use for pointers
continue
*
return
searching
2. The elements of an array are related by the fact that they have the same name and ___________.
constant variable
function scope
type
&
3. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
cout
base class
if...else
/n
4. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
Semicolon
classes
case sensitive
break
5. A function is invoked with a ________.
selection
escape sequences
editor
function call
6. 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.
Default memberwise assignment
prompt
void
object-oriented analysis and design (OOAD)
7. A variable that holds the address of another variable.
this
case sensitive
pointer
a.out
8. int namespace include using return examples of ___________
reserved words
reserve words
named constant
&
9. Preprocessor directive syntax
stack
beginning
//
#include <headerfilename>
10. newline
cin >> variable
endl (same as 'n')
n
opened
11. If a member initializer is not provided for a member object of a class the object's __________ is called.
allocating memory
NULL
default constructor
strlen()
12. Class members specified as _________ are accessible anywhere an object of the class is in scope.
void
return
Semicolon
public
13. The stream insertion operator
non-static
getline
<<
sorting
14. The modulus operator (%) can be used only with __________.
friend
integer operands
globals
*
15. Header file that contains commonly performed mathematical functions
Semicolon
cmath
data type
special symbols
16. The ________ enables access to a global variable with the same name as a variable in the current scope.
floating-point
unary scope resolution operator (::)
void
friend
17. These are data items whose values do not change while the program is running
reserve words
#include directive
operator
Literals
18. A function that can be used to read character data including whitespace
auto
Sentinel
cin.get(ch)
vectors
19. The number used to refer to a particular element of an array is called its ________.
information hiding
Arithmetic Operators
>>
subscript (or index)
20. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
assignment statement
binary operator
classes
globals
21. Whole numbers - no decimals and no commas included
classes
int values
associations
data type
22. Two slash marks ( // ) indicate __________ of a comment
beginning
object file
two-dimensional
type
23. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
char
Literals
mixed expression
initialized
24. Nonexecutable statements that are included in a program to provide information about what the program does etc.
address
binary operator
function overloading
comments
25. The _____ causes the contents of another file to be inserted into a program.
if...else
non-static
classes
#include directive
26. 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.
binary operator
beginning
inheritance
function prototype
27. This manipulator is used to establish a field width for the value immediately following it.
scope resolution operator
Closing brace
object file
setw
28. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
local variable
assignment
main
pointer
29. The ________ qualifier is used to declare read-only variables.
escape sequences
type coercion
/n
const
30. 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.
new line
reserve words
?
left
31. An expression in which all operands have the same data type - result will have the same data type as operands
inheritance
vectors
like-type expression
static
32. Function ________ is used to set the random number seed to randomize a program.
break
::
data type
srand
33. __________ can be used to assign an object of a class to another object of the same class.
beginning
strcpy()
public
Default memberwise assignment
34. The only integer that can be assigned directly to a pointer is_____________.
0
static_cast<char>(65)
type
special symbols
35. Compares two strings and returns 0 if they are equal.
strcmp()
identifiers
inheritance
new line
36. A type of pointer that can point at objects of any data type.
function parameters
void pointer
{ }
fixed
37. Member objects are constructed __________ their enclosing class object.
before
static
srand
default constructor
38. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
data type
endl (same as 'n')
selection
//
39. A variable that is known only within the function in which it is defined is called a ________.
local variable
Default memberwise assignment
if
function call
40. The ________ program combines the output of the compiler with various library functions to produce an executable image.
Preprocessor
linker
return
friend
41. For every opening brace in a C++ program there must be a ______________.
Closing brace
pointer
t
object-oriented analysis and design (OOAD)
42. The stream extraction operator
n
<<
char
>>
43. The process of analyzing and designing a system from an object-oriented point of view is called ________.
syntax
data type
object-oriented analysis and design (OOAD)
object file
44. All ______ must be declared before they are used.
case sensitive
object file
access specifier
variables
45. Initializers __________ must be used to initialize constant members of a class.
stack
srand
Default memberwise assignment
member
46. Words that are used for special purposes in a program
member
Preprocessor
reserved words
operator overloading
47. Every C++ statement ends with a(n) _________.
derived class
this
semicolon
type coercion
48. The size & shape & color and weight of an object are considered
cout
Sentinel
attributes
function overloading
49. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
getline
function parameters
Stack overflow
base class
50. Symbol that denotes an action to be performed
operator
const
associations
switch