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. Function ________ is used to set the random number seed to randomize a program.
continue
Arithmetic Operators
srand
floating-point
2. In inheritance the ____________ is the class the receives the inherited members.
derived class
register
fixed
like-type expression
3. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
type
like-type expression
data type
Stack overflow
4. A variable declared outside any block or function is a ________ variable.
auto
function call
global
char
5. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
local variable
like-type expression
ofstream
globals
6. To write data to a file you define an object of which one of the following
::
ofstream
token
heap
7. Every C++ program begins execution at the function _________.
function parameters
#include <headerfilename>
recursive
main
8. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
Counter-controlled or definite
data type
overloading
cin.get(ch)
9. The modulus operator (%) can be used only with __________.
static
integer operands
Unified Modeling Language(UML)
beginning
10. A member function should be declared static if it does not access __________ class members.
syntax
recursive
cin >> variable
non-static
11. The number used to refer to a particular element of an array is called its ________.
subscript (or index)
Closing brace
non-static
strcpy()
12. Classes can have relationships with other classes. These relationships are called ________.
#include directive
const
before
associations
13. Manipulator that causes the insertion point (cursor) to move to the beginning of the next line
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
14. A __________ data member represents class-wide information.
function parameters
break
static
vectors
15. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
//
&
information hiding
object-oriented analysis and design (OOAD)
16. Repeating a set of instructions a specific number of times is called_________repetition.
editor
Counter-controlled or definite
>>
continue
17. The process of analyzing and designing a system from an object-oriented point of view is called ________.
member
type casting (conversion)
?
object-oriented analysis and design (OOAD)
18. 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.
&
const datatype identifier = value
overloading
dot (.)
19. A function ________ enables a single function to be defined to perform a task on many different data types.
break
function scope
template
linker
20. The only integer that can be assigned directly to a pointer is_____________.
pointer
function overloading
Closing brace
0
21. The symbol for the binary scope resolution operator
continue
::
return
function call
22. The ________ program transfers the executable image of a C++ program from disk to memory.
loader
this
allocating memory
#include directive
23. The size & shape & color and weight of an object are considered
cmath
Default memberwise assignment
attributes
non-static
24. tab
setw
operand value
prompt
t
25. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
preprocessor
rand
auto
register
26. The three values that can be used to initialize a pointer are 0 - __________ and an address.
NULL
selection
preprocessor
base
27. To allow file access in a program you must #include this header file.
fstream
>>
prompt
named constant
28. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
new line
srand
/n
integer operands
29. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
derived class
#include
{ }
public
30. Keyword public is a(n) _________
selection
access specifier
classes
cout
31. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
variable
private
cin.get(ch)
Semicolon
32. A function that can be used to read character data including whitespace
cin.get(ch)
linker
showpoint
delete
33. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
Unified Modeling Language(UML)
source file
variables
subscript (or index)
34. A ________ program executes before the compiler's translation phase begins.
selection
preprocessor
function overloading
opened
35. A pointer is a variable that contains as its value the____________ of another variable.
attributes
#include <headerfilename>
address
if...else
36. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
if...else
const
?
arithmetic expression
37. Allows the programmer to store a value in a variable
const
assignment statement
setw
template
38. The _____ causes the contents of another file to be inserted into a program.
inline functions
access specifier
#include directive
polymorphism
39. A constant object must be __________; it cannot be modified after it is created.
initialized
#include directive
fstream
comments
40. A sequence of operands and operators that describe a calculation to be performed
inheritance
arithmetic expression
derived class
static_cast<char>(65)
41. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
subscript (or index)
selection
sorting
switch
42. * / % + -
break
opened
Arithmetic Operators
non-static
43. Message displayed to the screen asking user for input; generated with an output statement
classes
strcmp()
n
prompt
44. Used for function calls and local variables
//
Unified Modeling Language(UML)
operator
stack
45. Used to qualify hidden names so that they can be used.
arithmetic expression
vectors
main
scope resolution operator
46. Used for dynamically allocated variables
function call
unary operator
void pointer
heap
47. These are data items whose values do not change while the program is running
strcpy()
new line
Literals
variables
48. This manipulator causes the field to be left-justified with padding spaces printed to the right.
left
&
<<
*
49. 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.
void
main
variable
function parameters
50. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
dot (.)
cin >> variable
data type
operator overloading