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. Used for function calls and local variables
this
stack
#include
#include directive
2. newline
int values
operator
n
access specifier
3. A filestream variable that represents the default output device
cout
member
named constant
binary operator
4. Header file that contains commonly performed mathematical functions
const datatype identifier = value
cmath
return
arithmetic expression
5. This manipulator is used to establish a field width for the value immediately following it.
data type
global
setw
recursive
6. A variable that holds the address of another variable.
const
sorting
ofstream
pointer
7. Repeating a set of instructions a specific number of times is called_________repetition.
Counter-controlled or definite
char
function call
stack
8. Most calculations are normally performed by ______ statements.
operator
function overloading
&
assignment
9. = & | are examples of ____________.
two-dimensional
type
scope
special symbols
10. In inheritance the ____________ is the class that supplies the inherited members.
base class
derived class
this
object-oriented analysis and design (OOAD)
11. The address-of operator. it is used to assign pointers and to print the address of variables.
&
this
comments
preprocessor
12. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
Unified Modeling Language(UML)
function call
sorting
preprocessor
13. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
recursive function
base class
this
classes
14. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
base class
overloading
.cpp
Closing brace
15. The __________ operator reclaims memory previously allocated by new.
before
function scope
token
delete
16. The sign you use for pointers
*
default constructor
member
scope resolution operator
17. The _____ causes the contents of another file to be inserted into a program.
0
case sensitive
#include directive
attributes
18. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
Stack overflow
new line
reserved words
base class
19. Operator with two operands
Unified Modeling Language(UML)
void
pointer
binary operator
20. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
allocating memory
binary operator
preprocessor
globals
21. To write data to a file you define an object of which one of the following
overloading
editor
setw
ofstream
22. Associate an identifier with a memory location
pointer
/n
void
allocating memory
23. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
cin
sorting
base
new line
24. Symbol that denotes an action to be performed
/n
operator
Counter-controlled or definite
n
25. The stream insertion operator
ofstream
<<
cin >> variable
before
26. Default name of executable file
assignment statement
cin.get(ch)
a.out
const datatype identifier = value
27. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
private
before
named constant
operator
28. The only integer that can be assigned directly to a pointer is_____________.
virtual functions
operator
0
if
29. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
assignment
const
polymorphism
reserve words
30. A file must be ________ before data can be written to or read from it.
source file
main
editor
opened
31. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
variables
operator overloading
public
assignment statement
32. A type of pointer that can point at objects of any data type.
void pointer
named constant
t
Unified Modeling Language(UML)
33. 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.
prompt
inheritance
dot (.)
{ }
34. C++ programs are normally typed into a computer using a(n) ________ program.
% modulus
semantics
switch
editor
35. 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.
mixed expression
void
reserved words
Unified Modeling Language(UML)
36. These are data items whose values do not change while the program is running
getline
strcmp()
Literals
showpoint
37. An expression that has operands with different data types
mixed expression
selection
return
identifiers
38. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
associations
new line
register
special symbols
39. Naming convention for C++ programs
getline
.cpp
left
globals
40. The ________ qualifier is used to declare read-only variables.
recursive
reserved words
const
//
41. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
showpoint
cin >> variable
{ }
NULL
42. 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
floating-point
base
Unified Modeling Language(UML)
static
43. Operator with only one operand
unary operator
escape sequences
object file
const
44. A memory location with a name and data type - its content may be changed during program execution
variable
Semicolon
source file
>>
45. This is used to mark the end of a complete C++ programming statement.
Preprocessor
constant variable
Semicolon
Arithmetic Operators
46. The idea that you can call the same function and the output will depend on the type of object you're using.
showpoint
function parameters
polymorphism
strlen()
47. 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.
stack
constant variable
static
const datatype identifier = value
48. A set of values together with a set of operations
operator overloading
cmath
void
data type
49. For every opening brace in a C++ program there must be a ______________.
Closing brace
inline functions
function overloading
const datatype identifier = value
50. Every C++ program begins execution at the function _________.
cout
base class
::
main