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 references
assignment statement
public
setw
&
2. A function is invoked with a ________.
globals
srand
data type
function call
3. Associate an identifier with a memory location
definition
object-oriented analysis and design (OOAD)
srand
allocating memory
4. data types that refer to numbers with decimals
floating-point
recursive function
non-static
const datatype identifier = value
5. Classes can have relationships with other classes. These relationships are called ________.
preprocessor
template
<<
associations
6. The ________ program transfers the executable image of a C++ program from disk to memory.
local variable
opened
loader
setw
7. Lists and tables of values can be stored in arrays or __________.
virtual functions
vectors
object file
const
8. The three values that can be used to initialize a pointer are 0 - __________ and an address.
floating-point
t
Stack overflow
NULL
9. Preprocessor directive syntax
#include <headerfilename>
assignment
Stack overflow
delete
10. A member function should be declared static if it does not access __________ class members.
operand value
non-static
source file
#include <headerfilename>
11. directive A statement that starts with a # is called a ____________.
left
Preprocessor
#include directive
information hiding
12. Initializers __________ must be used to initialize constant members of a class.
>>
member
% modulus
pointer
13. In inheritance the ____________ is the class that supplies the inherited members.
base class
non-static
like-type expression
.cpp
14. All ______ must be declared before they are used.
variables
vectors
cin
prompt
15. In inheritance the ____________ is the class the receives the inherited members.
reserved words
preprocessor
int values
derived class
16. Whole numbers - no decimals and no commas included
semicolon
static
int values
type
17. A variable that is known only within the function in which it is defined is called a ________.
local variable
selection
/n
#include <headerfilename>
18. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
showpoint
operator overloading
new line
member
19. A ________ program executes before the compiler's translation phase begins.
Closing brace
n
register
preprocessor
20. Operator with only one operand
selection
base
unary operator
static
21. 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.
Closing brace
strcpy()
mixed expression
?
22. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
overloading
cin >> variable
void pointer
% modulus
23. Message displayed to the screen asking user for input; generated with an output statement
pointer
unary scope resolution operator (::)
like-type expression
prompt
24. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
srand
operator overloading
inheritance
this
25. This is used to mark the end of a complete C++ programming statement.
type casting (conversion)
Semicolon
allocating memory
//
26. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
semantics
&
0
linker
27. Every C++ statement ends with a(n) _________.
#include
base
semicolon
n
28. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
whitespace
void
friend
virtual functions
29. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
Stack overflow
initialized
syntax
access specifier
30. Member objects are constructed __________ their enclosing class object.
const
before
break
*
31. The idea that you can call the same function and the output will depend on the type of object you're using.
this
editor
polymorphism
stack
32. A C++ statement that makes a decision is ______.
if
classes
setw
operand value
33. The number used to refer to a particular element of an array is called its ________.
Counter-controlled or definite
base class
virtual functions
subscript (or index)
34. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
binary operator
access specifier
type
function overloading
35. 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.
information hiding
pointer
return
ofstream
36. The process of placing the elements of an array in order is called ________ the array.
Preprocessor
sorting
t
Sentinel
37. A constant object must be __________; it cannot be modified after it is created.
before
?
NULL
initialized
38. Creates a copy of a string.
function parameters
NULL
strcpy()
function overloading
39. A variable declared outside any block or function is a ________ variable.
strcmp()
unary scope resolution operator (::)
char
global
40. Returns the length of a string excluding the null terminator.
if
#include <headerfilename>
searching
strlen()
41. The stream insertion operator
arithmetic expression
<<
object-oriented analysis and design (OOAD)
vectors
42. Sets floating-point values to a fixed decimal format
register
fixed
integer operands
binary operator
43. __________ can be used to assign an object of a class to another object of the same class.
cin
token
searching
Default memberwise assignment
44. Characters used to separate symbols or reserved words or identifiers and statements
Arithmetic Operators
whitespace
operator
left
45. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
special symbols
inheritance
pointer
globals
46. 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.
Unified Modeling Language(UML)
Closing brace
semicolon
dot (.)
47. The ________ statement in a called function passes the value of an expression back to the calling function.
return
const datatype identifier = value
before
searching
48. Class members specified as _________ are accessible anywhere an object of the class is in scope.
public
#include directive
void pointer
strlen()
49. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
information hiding
Unified Modeling Language(UML)
allocating memory
% modulus
50. 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.
Preprocessor
main
% modulus
void