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. Operator with only one operand
unary operator
void
Default memberwise assignment
Unified Modeling Language(UML)
2. Header file that contains commonly performed mathematical functions
object-oriented analysis and design (OOAD)
cmath
#include directive
preprocessor
3. A member function should be declared static if it does not access __________ class members.
cin
non-static
NULL
fstream
4. The ________ of an identifier is the portion of the program in which the identifier can be used.
subscript (or index)
scope
const datatype identifier = value
Sentinel
5. A variable that holds the address of another variable.
constant variable
pointer
stack
case sensitive
6. In inheritance the ____________ is the class that supplies the inherited members.
base class
/n
&
token
7. Program components in C++ are called functions and ________.
scope resolution operator
const
classes
cin >> variable
8. All C++ Variables are_________.
inheritance
register
function prototype
case sensitive
9. A function that can be used to read character data including whitespace
#include
linker
cin.get(ch)
dot (.)
10. A human readable file that contains C++ program
source file
prompt
rand
floating-point
11. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
char
left
break
pointer
12. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
token
base
local variable
object file
13. For every opening brace in a C++ program there must be a ______________.
break
virtual functions
Closing brace
static
14. Use 2 characters to represent one
local variable
#include directive
pointer
escape sequences
15. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
pointer
variables
auto
function prototype
16. An operator that can only be used with int values. result will always be an int.
operand value
delete
% modulus
allocating memory
17. Words that are used for special purposes in a program
cout
operand value
rand
reserved words
18. Sets floating-point values to a fixed decimal format
source file
int values
fixed
rand
19. A constant object must be __________; it cannot be modified after it is created.
static
strcmp()
initialized
dot (.)
20. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
globals
global
void
delete
21. The idea that you can call the same function and the output will depend on the type of object you're using.
Sentinel
polymorphism
associations
definition
22. A program that finds and attaches to your program the indicated libraries for compilation
preprocessor
derived class
function overloading
type
23. The number used to refer to a particular element of an array is called its ________.
operator overloading
subscript (or index)
static
escape sequences
24. The __________ operator reclaims memory previously allocated by new.
setw
base class
delete
scope
25. A sequence of operands and operators that describe a calculation to be performed
two-dimensional
arithmetic expression
srand
Closing brace
26. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
information hiding
function prototype
semantics
ofstream
27. All ______ must be declared before they are used.
variables
register
delete
cin >> variable
28. Repeating a set of instructions a specific number of times is called_________repetition.
Counter-controlled or definite
a.out
if
.cpp
29. Characters used to separate symbols or reserved words or identifiers and statements
static
cmath
whitespace
loader
30. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
operator overloading
polymorphism
0
constant variable
31. The stream extraction operator
classes
>>
unary scope resolution operator (::)
ofstream
32. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
source file
function parameters
static_cast<char>(65)
register
33. When a value of one data type is implicitly (automatically) changed to another data type
globals
type coercion
variables
operand value
34. The ________ qualifier is used to declare read-only variables.
showpoint
base class
const
*
35. Function ________ is used to set the random number seed to randomize a program.
named constant
srand
comments
type
36. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
0
strcmp()
syntax
inline functions
37. Creates a copy of a string.
strcpy()
void pointer
Closing brace
void
38. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
operand value
named constant
#include <headerfilename>
classes
39. 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.
global
editor
function prototype
continue
40. Naming convention for C++ programs
register
like-type expression
.cpp
definition
41. A type of pointer that can point at objects of any data type.
cin
this
void pointer
Unified Modeling Language(UML)
42. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
char
Sentinel
inline functions
base class
43. The _____ causes the contents of another file to be inserted into a program.
cin
#include
#include directive
function parameters
44. Associate an identifier with a memory location
allocating memory
strcpy()
pointer
t
45. Initializers __________ must be used to initialize constant members of a class.
case sensitive
cin >> variable
member
operator
46. A C++ statement that makes a decision is ______.
if
template
this
scope
47. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
source file
assignment statement
register
void
48. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
operator
selection
int values
switch
49. 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.
Sentinel
type
definition
inheritance
50. You must have a ___________ for every variable you intend to use in a program
definition
function call
.cpp
preprocessor