SUBJECTS
|
BROWSE
|
CAREER CENTER
|
POPULAR
|
JOIN
|
LOGIN
Business Skills
|
Soft Skills
|
Basic Literacy
|
Certifications
About
|
Help
|
Privacy
|
Terms
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 size & shape & color and weight of an object are considered
before
attributes
case sensitive
variable
2. A function that can be used to read character data including whitespace
pointer
preprocessor
derived class
cin.get(ch)
3. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
operator overloading
*
beginning
Semicolon
4. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
#include directive
const
inheritance
Stack overflow
5. A variable declared outside any block or function is a ________ variable.
register
editor
const datatype identifier = value
global
6. Use 2 characters to represent one
function scope
escape sequences
prompt
before
7. Whole numbers - no decimals and no commas included
virtual functions
int values
token
new line
8. The ________ qualifier is used to declare read-only variables.
?
source file
const
a.out
9. A human readable file that contains C++ program
source file
setw
cin
object-oriented analysis and design (OOAD)
10. Allows the programmer to store a value in a variable
strlen()
NULL
assignment statement
private
11. An expression that has operands with different data types
void
return
two-dimensional
mixed expression
12. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
return
Stack overflow
void
cmath
13. A function is invoked with a ________.
function call
Literals
main
type coercion
14. Every C++ statement ends with a(n) _________.
semicolon
static
global
return
15. Objects have the property of ________although objects may know how to communicate with one another across well-defined interfaces - they normally are not allowed to know how other objects are implemented.
special symbols
assignment
information hiding
data type
16. 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.
unary operator
?
#include
overloading
17. Identifier or expression that is part of the calculation to be performed
Counter-controlled or definite
classes
dot (.)
operand value
18. The number used to refer to a particular element of an array is called its ________.
subscript (or index)
unary operator
assignment
pointer
19. All ______ must be declared before they are used.
srand
fstream
variables
associations
20. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
recursive
fixed
getline
const
21. tab
t
continue
//
fixed
22. You can declare default values for a function in the ____________________.
&
{ }
unary operator
function parameters
23. If a member initializer is not provided for a member object of a class the object's __________ is called.
default constructor
fstream
Unified Modeling Language(UML)
new line
24. The only integer that can be assigned directly to a pointer is_____________.
0
main
cin >> variable
int values
25. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
{ }
reserved words
data type
this
26. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
initialized
variable
loader
cin >> variable
27. This is used to mark the end of a complete C++ programming statement.
*
sorting
Semicolon
information hiding
28. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
like-type expression
strcpy()
Unified Modeling Language(UML)
register
29. 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.
type coercion
recursive
continue
polymorphism
30. To explicitly indicate that a value is to be converted to another type
floating-point
operator overloading
Closing brace
type casting (conversion)
31. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
setw
>>
return
semicolon
32. An array that uses two subscripts is referred to as a(n) _________ array.
two-dimensional
semicolon
editor
continue
33. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
globals
associations
return
prompt
34. Nonexecutable statements that are included in a program to provide information about what the program does etc.
address
comments
member
data type
35. A constant object must be __________; it cannot be modified after it is created.
cin >> variable
initialized
pointer
mixed expression
36. A filestream variable that represents the default output device
cout
% modulus
static
reserve words
37. A C++ statement that makes a decision is ______.
if
function overloading
return
recursive function
38. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
mixed expression
main
register
address
39. Member objects are constructed __________ their enclosing class object.
function parameters
&
floating-point
before
40. The address-of operator. it is used to assign pointers and to print the address of variables.
vectors
&
binary operator
cmath
41. Initializers __________ must be used to initialize constant members of a class.
opened
member
object file
globals
42. The __________ operator reclaims memory previously allocated by new.
delete
Stack overflow
function call
address
43. A memory location with a name and data type - its content may be changed during program execution
function parameters
Counter-controlled or definite
char
variable
44. Lists and tables of values can be stored in arrays or __________.
static
&
vectors
overloading
45. The _________ begins the body of every function and the _________ ends the body of every function.
int values
loader
{ }
beginning
46. 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.
inheritance
preprocessor
Sentinel
operand value
47. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
t
inheritance
semicolon
private
48. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
break
return
setw
int values
49. A type of pointer that can point at objects of any data type.
searching
classes
unary operator
void pointer
50. A ________ program executes before the compiler's translation phase begins.
preprocessor
void
n
auto