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 process of analyzing and designing a system from an object-oriented point of view is called ________.
object-oriented analysis and design (OOAD)
break
reserve words
attributes
2. Lists and tables of values can be stored in arrays or __________.
return
*
vectors
new line
3. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
function call
associations
new line
globals
4. If a member initializer is not provided for a member object of a class the object's __________ is called.
a.out
cout
switch
default constructor
5. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
reserve words
loader
#include
floating-point
6. Words that are used for special purposes in a program
srand
recursive
::
reserved words
7. A function ________ enables a single function to be defined to perform a task on many different data types.
base
linker
template
return
8. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
polymorphism
rand
fixed
named constant
9. To allow file access in a program you must #include this header file.
fstream
main
heap
new line
10. * / % + -
whitespace
before
arithmetic expression
Arithmetic Operators
11. A program that finds and attaches to your program the indicated libraries for compilation
non-static
Closing brace
function call
preprocessor
12. The _________ begins the body of every function and the _________ ends the body of every function.
left
pointer
{ }
definition
13. The modulus operator (%) can be used only with __________.
function prototype
integer operands
a.out
semicolon
14. Used for dynamically allocated variables
private
#include directive
heap
variable
15. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
before
function scope
function parameters
information hiding
16. 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
Closing brace
linker
17. The address-of operator. it is used to assign pointers and to print the address of variables.
before
&
vectors
a.out
18. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
reserve words
operand value
inheritance
this
19. Function ________ is used to set the random number seed to randomize a program.
type casting (conversion)
srand
access specifier
mixed expression
20. Program components in C++ are called functions and ________.
setw
a.out
classes
private
21. An operator that can only be used with int values. result will always be an int.
/n
% modulus
information hiding
searching
22. C++ programs are normally typed into a computer using a(n) ________ program.
semicolon
a.out
assignment statement
editor
23. A function is invoked with a ________.
derived class
const
recursive
function call
24. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
endl (same as 'n')
0
strlen()
switch
25. 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.
rand
0
whitespace
Sentinel
26. When you create a ___________________in the base class and then call it using an object the function will know to look in the inherited class for the specifics of that function.
if
derived class
&
virtual functions
27. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
Unified Modeling Language(UML)
classes
break
Literals
28. data types that refer to numbers with decimals
cmath
reserved words
floating-point
recursive function
29. A filestream variable that represents the default output device
cout
default constructor
if...else
arithmetic expression
30. Whole numbers - no decimals and no commas included
int values
NULL
Arithmetic Operators
whitespace
31. Syntax for named constant declaration
Arithmetic Operators
ofstream
base
const datatype identifier = value
32. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
attributes
unary scope resolution operator (::)
getline
derived class
33. Creates a copy of a string.
preprocessor
strcpy()
strlen()
if...else
34. Initializers __________ must be used to initialize constant members of a class.
Counter-controlled or definite
two-dimensional
member
preprocessor
35. Function ________ is used to produce random numbers.
object file
rand
this
char
36. The ________ of an identifier is the portion of the program in which the identifier can be used.
object-oriented analysis and design (OOAD)
scope
scope resolution operator
information hiding
37. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
mixed expression
Closing brace
0
globals
38. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
cin >> variable
static
loader
information hiding
39. A filestream variable that represents the default input source
cin
beginning
floating-point
return
40. The _____ causes the contents of another file to be inserted into a program.
#include directive
register
n
constant variable
41. A constant object must be __________; it cannot be modified after it is created.
register
initialized
constant variable
fixed
42. Names of things that are used in a program - can apply to variables & constants and functions
base
fixed
identifiers
% modulus
43. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
special symbols
Closing brace
operator overloading
editor
44. 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
45. int namespace include using return examples of ___________
switch
stack
initialized
reserve words
46. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
type coercion
const
#include directive
t
47. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
access specifier
/n
const datatype identifier = value
friend
48. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
Sentinel
subscript (or index)
overloading
Closing brace
49. The size & shape & color and weight of an object are considered
attributes
t
non-static
showpoint
50. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
private
template
const
Arithmetic Operators