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. A ________ program executes before the compiler's translation phase begins.
preprocessor
private
operator overloading
semantics
2. Names of things that are used in a program - can apply to variables & constants and functions
base class
scope resolution operator
type casting (conversion)
identifiers
3. The ________ program combines the output of the compiler with various library functions to produce an executable image.
linker
searching
cin.get(ch)
t
4. The ________ program transfers the executable image of a C++ program from disk to memory.
local variable
loader
rand
if
5. The __________ operator reclaims memory previously allocated by new.
function scope
object-oriented analysis and design (OOAD)
register
delete
6. Operator with two operands
cin
binary operator
break
integer operands
7. A constant object must be __________; it cannot be modified after it is created.
n
assignment
function overloading
initialized
8. 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.
editor
::
pointer
information hiding
9. 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.
<<
continue
address
#include <headerfilename>
10. The sign you use for references
cin.get(ch)
&
delete
case sensitive
11. The process of placing the elements of an array in order is called ________ the array.
recursive function
sorting
#include directive
associations
12. Two slash marks ( // ) indicate __________ of a comment
getline
Stack overflow
beginning
private
13. A filestream variable that represents the default input source
beginning
Closing brace
cin
t
14. Words that are used for special purposes in a program
function call
cmath
delete
reserved words
15. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
type casting (conversion)
friend
attributes
token
16. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
source file
private
void
#include <headerfilename>
17. newline
n
Default memberwise assignment
assignment statement
type
18. A function is invoked with a ________.
cmath
allocating memory
base
function call
19. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
classes
allocating memory
showpoint
main
20. The _________ begins the body of every function and the _________ ends the body of every function.
cin >> variable
this
attributes
{ }
21. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
cmath
register
const datatype identifier = value
linker
22. A variable declared outside any block or function is a ________ variable.
friend
inheritance
?
global
23. Forces the computer to display decimal point and trailing zeroes
prompt
showpoint
&
if...else
24. Executable version of program
loader
object file
type casting (conversion)
inline functions
25. Keyword public is a(n) _________
named constant
*
definition
access specifier
26. Used for dynamically allocated variables
address
#include directive
heap
n
27. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
continue
linker
void
auto
28. To explicitly indicate that a value is to be converted to another type
type coercion
classes
type casting (conversion)
auto
29. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
unary operator
#include
beginning
cin
30. A filestream variable that represents the default output device
//
pointer
base class
cout
31. The modulus operator (%) can be used only with __________.
beginning
mixed expression
pointer
integer operands
32. 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.
const
void
strcpy()
arithmetic expression
33. The process of determining if an array contains a particular key value is called _________ the array.
semantics
searching
type casting (conversion)
char
34. Used to qualify hidden names so that they can be used.
scope resolution operator
continue
void
base
35. The storage-class specifiers are mutable - auto - ________ - extern and static.
register
operator overloading
int values
this
36. Creates a copy of a string.
function prototype
strcpy()
cin
cin >> variable
37. A recursive function typically has two components: One that provides a means for the recursion to terminate by testing for a(n) ________ case and one that expresses the problem as a recursive call for a slightly simpler problem than the original call
reserved words
showpoint
strcmp()
base
38. Most calculations are normally performed by ______ statements.
int values
overloading
/n
assignment
39. For a local variable in a function to retain its value between calls to the function it must be declared with the ________ storage-class specifier.
prompt
static
inline functions
inheritance
40. All ______ must be declared before they are used.
access specifier
left
variables
base
41. 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.
named constant
opened
dot (.)
Default memberwise assignment
42. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
function prototype
int values
function call
strcmp()
43. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
globals
?
semantics
Default memberwise assignment
44. Program components in C++ are called functions and ________.
two-dimensional
classes
like-type expression
reserve words
45. Use 2 characters to represent one
editor
preprocessor
a.out
escape sequences
46. The address-of operator. it is used to assign pointers and to print the address of variables.
sorting
cin >> variable
binary operator
&
47. For every opening brace in a C++ program there must be a ______________.
const datatype identifier = value
Closing brace
::
NULL
48. In inheritance the ____________ is the class that supplies the inherited members.
fixed
Arithmetic Operators
data type
base class
49. Header file that contains commonly performed mathematical functions
access specifier
cmath
Semicolon
strlen()
50. Function ________ is used to produce random numbers.
operand value
allocating memory
pointer
rand