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. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
private
default constructor
operator overloading
register
2. A __________ should be used to declare the size of an array because it makes the program more scalable.
constant variable
operand value
srand
type
3. A function ________ enables a single function to be defined to perform a task on many different data types.
Closing brace
template
inline functions
char
4. A variable that is known only within the function in which it is defined is called a ________.
pointer
pointer
overloading
local variable
5. A filestream variable that represents the default output device
global
>>
cout
pointer
6. The process of analyzing and designing a system from an object-oriented point of view is called ________.
&
local variable
object-oriented analysis and design (OOAD)
token
7. 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.
dot (.)
Unified Modeling Language(UML)
>>
strcmp()
8. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
function scope
void
switch
&
9. In inheritance the ____________ is the class that supplies the inherited members.
dot (.)
derived class
base class
access specifier
10. The modulus operator (%) can be used only with __________.
static
integer operands
return
if
11. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
fstream
n
function prototype
register
12. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
reserved words
token
return
function overloading
13. data types that refer to numbers with decimals
strlen()
floating-point
recursive
variable
14. To write data to a file you define an object of which one of the following
::
variables
ofstream
preprocessor
15. The ________ of an identifier is the portion of the program in which the identifier can be used.
int values
polymorphism
scope
cmath
16. 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.
non-static
continue
auto
const
17. C++ programs are normally typed into a computer using a(n) ________ program.
cin
derived class
editor
void
18. 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
srand
case sensitive
base
% modulus
19. Function ________ is used to produce random numbers.
Preprocessor
rand
unary operator
variable
20. Program components in C++ are called functions and ________.
operator overloading
return
like-type expression
classes
21. directive A statement that starts with a # is called a ____________.
strlen()
Preprocessor
Stack overflow
opened
22. Repeating a set of instructions a specific number of times is called_________repetition.
prompt
variable
Counter-controlled or definite
t
23. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
editor
cout
selection
comments
24. The elements of an array are related by the fact that they have the same name and ___________.
identifiers
source file
type
NULL
25. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
this
template
Semicolon
information hiding
26. 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.
n
switch
static
function parameters
27. Most calculations are normally performed by ______ statements.
assignment
whitespace
vectors
srand
28. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
non-static
int values
const
srand
29. A sequence of operands and operators that describe a calculation to be performed
*
data type
arithmetic expression
semantics
30. Names of things that are used in a program - can apply to variables & constants and functions
pointer
associations
rand
identifiers
31. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
operator overloading
operator
globals
/n
32. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
arithmetic expression
delete
Unified Modeling Language(UML)
rand
33. Used for dynamically allocated variables
if...else
heap
identifiers
searching
34. The ________ qualifier is used to declare read-only variables.
identifiers
const
preprocessor
register
35. Whole numbers - no decimals and no commas included
pointer
initialized
int values
function overloading
36. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
heap
//
static_cast<char>(65)
attributes
37. An expression that has operands with different data types
mixed expression
register
special symbols
scope resolution operator
38. The stream extraction operator
stack
type
>>
void pointer
39. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
.cpp
char
information hiding
const
40. When a value of one data type is implicitly (automatically) changed to another data type
void pointer
type coercion
static
new line
41. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
object-oriented analysis and design (OOAD)
template
function overloading
0
42. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
token
prompt
source file
searching
43. An operator that can only be used with int values. result will always be an int.
% modulus
register
comments
::
44. A variable declared outside any block or function is a ________ variable.
syntax
global
like-type expression
whitespace
45. The ________ program transfers the executable image of a C++ program from disk to memory.
operator overloading
loader
source file
&
46. Symbol that denotes an action to be performed
operator
const
if...else
escape sequences
47. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
default constructor
endl (same as 'n')
if...else
sorting
48. The address-of operator. it is used to assign pointers and to print the address of variables.
opened
&
loader
address
49. newline
Closing brace
this
*
n
50. You must have a ___________ for every variable you intend to use in a program
allocating memory
source file
#include
definition
Sorry!:) No result found.
Can you answer 50 questions in 15 minutes?
Let me suggest you:
Browse all subjects
Browse all tests
Most popular tests
Major Subjects
Tests & Exams
AP
CLEP
DSST
GRE
SAT
GMAT
Certifications
CISSP go to https://www.isc2.org/
PMP
ITIL
RHCE
MCTS
More...
IT Skills
Android Programming
Data Modeling
Objective C Programming
Basic Python Programming
Adobe Illustrator
More...
Business Skills
Advertising Techniques
Business Accounting Basics
Business Strategy
Human Resource Management
Marketing Basics
More...
Soft Skills
Body Language
People Skills
Public Speaking
Persuasion
Job Hunting And Resumes
More...
Vocabulary
GRE Vocab
SAT Vocab
TOEFL Essential Vocab
Basic English Words For All
Global Words You Should Know
Business English
More...
Languages
AP German Vocab
AP Latin Vocab
SAT Subject Test: French
Italian Survival
Norwegian Survival
More...
Engineering
Audio Engineering
Computer Science Engineering
Aerospace Engineering
Chemical Engineering
Structural Engineering
More...
Health Sciences
Basic Nursing Skills
Health Science Language Fundamentals
Veterinary Technology Medical Language
Cardiology
Clinical Surgery
More...
English
Grammar Fundamentals
Literary And Rhetorical Vocab
Elements Of Style Vocab
Introduction To English Major
Complete Advanced Sentences
Literature
Homonyms
More...
Math
Algebra Formulas
Basic Arithmetic: Measurements
Metric Conversions
Geometric Properties
Important Math Facts
Number Sense Vocab
Business Math
More...
Other Major Subjects
Science
Economics
History
Law
Performing-arts
Cooking
Logic & Reasoning
Trivia
Browse all subjects
Browse all tests
Most popular tests