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 address-of operator. it is used to assign pointers and to print the address of variables.
delete
Default memberwise assignment
whitespace
&
2. The only integer that can be assigned directly to a pointer is_____________.
identifiers
0
cin.get(ch)
NULL
3. int namespace include using return examples of ___________
>>
reserve words
function parameters
integer operands
4. This manipulator causes the field to be left-justified with padding spaces printed to the right.
cin >> variable
inheritance
left
semantics
5. To explicitly indicate that a value is to be converted to another type
type
type casting (conversion)
cin
variables
6. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
inheritance
cin >> variable
<<
unary operator
7. The stream extraction operator
>>
0
register
delete
8. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
operator overloading
return
static
0
9. Words that are used for special purposes in a program
reserved words
semantics
operator
binary operator
10. Operator with two operands
Arithmetic Operators
binary operator
attributes
heap
11. 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.
constant variable
cout
comments
void
12. directive A statement that starts with a # is called a ____________.
stack
cin
Preprocessor
vectors
13. When it is not known in advance how many times a set of statements will be repeated a _________value can be used to terminate the repetition.
::
variable
Sentinel
object file
14. A function that can be used to read character data including whitespace
object-oriented analysis and design (OOAD)
srand
cin.get(ch)
identifiers
15. Repeating a set of instructions a specific number of times is called_________repetition.
Counter-controlled or definite
polymorphism
base class
Default memberwise assignment
16. The ________ program combines the output of the compiler with various library functions to produce an executable image.
whitespace
linker
escape sequences
identifiers
17. Program components in C++ are called functions and ________.
cin.get(ch)
{ }
floating-point
classes
18. A pointer is a variable that contains as its value the____________ of another variable.
type
type casting (conversion)
globals
address
19. 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.
assignment
dot (.)
scope resolution operator
Closing brace
20. Grammar rules of the language; compiler will try to identify and locate syntax errors
definition
a.out
syntax
scope
21. Preprocessor directive syntax
private
&
delete
#include <headerfilename>
22. Header file that contains commonly performed mathematical functions
?
function call
switch
cmath
23. An expression in which all operands have the same data type - result will have the same data type as operands
like-type expression
linker
//
Stack overflow
24. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
globals
heap
>>
arithmetic expression
25. Associate an identifier with a memory location
function prototype
Stack overflow
void
allocating memory
26. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
arithmetic expression
preprocessor
classes
static
27. To write data to a file you define an object of which one of the following
Counter-controlled or definite
new line
ofstream
two-dimensional
28. You can declare default values for a function in the ____________________.
function parameters
assignment
whitespace
#include <headerfilename>
29. The process of analyzing and designing a system from an object-oriented point of view is called ________.
friend
semicolon
initialized
object-oriented analysis and design (OOAD)
30. Used for dynamically allocated variables
cout
classes
NULL
heap
31. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
friend
void
inline functions
two-dimensional
32. A constant object must be __________; it cannot be modified after it is created.
mixed expression
&
initialized
const datatype identifier = value
33. Naming convention for C++ programs
n
.cpp
named constant
Closing brace
34. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
Closing brace
object-oriented analysis and design (OOAD)
type
function overloading
35. A human readable file that contains C++ program
void
allocating memory
.cpp
source file
36. The elements of an array are related by the fact that they have the same name and ___________.
type
Closing brace
cout
unary operator
37. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
source file
new line
register
cmath
38. A function is invoked with a ________.
operator
Literals
function call
overloading
39. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
void pointer
unary scope resolution operator (::)
token
fstream
40. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
variables
comments
pointer
semantics
41. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
friend
a.out
main
//
42. tab
sorting
t
reserved words
mixed expression
43. A __________ data member represents class-wide information.
assignment statement
0
static
object-oriented analysis and design (OOAD)
44. 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.
/n
Arithmetic Operators
inheritance
*
45. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
Literals
named constant
template
cin
46. Whole numbers - no decimals and no commas included
int values
linker
return
variables
47. A function that calls itself
searching
object file
void
recursive function
48. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
private
preprocessor
function parameters
const
49. Identifier or expression that is part of the calculation to be performed
operand value
special symbols
Counter-controlled or definite
pointer
50. Creates a copy of a string.
continue
Semicolon
strcpy()
scope resolution operator