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. C++ programs are normally typed into a computer using a(n) ________ program.
inline functions
editor
scope resolution operator
void
2. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
floating-point
prompt
cin
void
3. Use 2 characters to represent one
subscript (or index)
escape sequences
searching
cin.get(ch)
4. All ______ must be declared before they are used.
operator
preprocessor
variables
strcmp()
5. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
classes
switch
left
Preprocessor
6. * / % + -
&
integer operands
Arithmetic Operators
void
7. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
const
operator overloading
allocating memory
#include <headerfilename>
8. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
?
variables
non-static
return
9. Sets floating-point values to a fixed decimal format
before
/n
fixed
cin.get(ch)
10. In inheritance the ____________ is the class that supplies the inherited members.
base class
selection
Closing brace
#include <headerfilename>
11. 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
12. The __________ operator reclaims memory previously allocated by new.
assignment statement
object file
delete
% modulus
13. To allow file access in a program you must #include this header file.
Default memberwise assignment
fstream
type coercion
>>
14. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
named constant
void pointer
const datatype identifier = value
function parameters
15. Program components in C++ are called functions and ________.
classes
scope
void pointer
int values
16. The symbol for the binary scope resolution operator
#include directive
::
globals
getline
17. directive A statement that starts with a # is called a ____________.
token
Preprocessor
prompt
Default memberwise assignment
18. Allows the programmer to store a value in a variable
&
polymorphism
syntax
assignment statement
19. An expression in which all operands have the same data type - result will have the same data type as operands
before
function call
like-type expression
unary operator
20. Header file that contains commonly performed mathematical functions
definition
cmath
n
Arithmetic Operators
21. Used to qualify hidden names so that they can be used.
#include
getline
scope resolution operator
Sentinel
22. The _____ causes the contents of another file to be inserted into a program.
t
void
#include directive
const
23. A sequence of operands and operators that describe a calculation to be performed
delete
left
recursive function
arithmetic expression
24. In inheritance the ____________ is the class the receives the inherited members.
object file
char
#include
derived class
25. __________ can be used to assign an object of a class to another object of the same class.
case sensitive
template
Default memberwise assignment
linker
26. The number used to refer to a particular element of an array is called its ________.
NULL
searching
subscript (or index)
n
27. 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.
endl (same as 'n')
heap
inheritance
n
28. Associate an identifier with a memory location
allocating memory
beginning
heap
const datatype identifier = value
29. These are data items whose values do not change while the program is running
source file
operator overloading
linker
Literals
30. The _________ begins the body of every function and the _________ ends the body of every function.
if
derived class
{ }
continue
31. The sign you use for references
void
&
dot (.)
reserve words
32. To write data to a file you define an object of which one of the following
ofstream
int values
function scope
% modulus
33. The size & shape & color and weight of an object are considered
attributes
classes
continue
register
34. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
% modulus
reserved words
editor
const
35. Characters used to separate symbols or reserved words or identifiers and statements
whitespace
int values
reserve words
variable
36. Initializers __________ must be used to initialize constant members of a class.
cin.get(ch)
Sentinel
member
type
37. The address-of operator. it is used to assign pointers and to print the address of variables.
0
&
Arithmetic Operators
definition
38. Syntax for named constant declaration
information hiding
const datatype identifier = value
local variable
#include <headerfilename>
39. A human readable file that contains C++ program
type
public
strcpy()
source file
40. Used for dynamically allocated variables
Literals
heap
searching
like-type expression
41. 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.
assignment
Sentinel
base
&
42. Whole numbers - no decimals and no commas included
public
searching
int values
selection
43. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
globals
Semicolon
base
strcmp()
44. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
cin >> variable
two-dimensional
return
char
45. 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
base
cin
static
assignment
46. A ________ program executes before the compiler's translation phase begins.
case sensitive
::
switch
preprocessor
47. A constant object must be __________; it cannot be modified after it is created.
Counter-controlled or definite
inheritance
initialized
address
48. Classes can have relationships with other classes. These relationships are called ________.
*
associations
n
polymorphism
49. 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
named constant
left
type coercion
50. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
information hiding
attributes
global
token