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 __________ operator reclaims memory previously allocated by new.
global
*
delete
Literals
2. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
char
loader
function overloading
void
3. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
Arithmetic Operators
semantics
Counter-controlled or definite
public
4. A variable that holds the address of another variable.
/n
pointer
cin >> variable
void pointer
5. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
ofstream
function prototype
getline
dot (.)
6. A constant object must be __________; it cannot be modified after it is created.
friend
function parameters
.cpp
initialized
7. This is used to mark the end of a complete C++ programming statement.
polymorphism
function prototype
arithmetic expression
Semicolon
8. A file must be ________ before data can be written to or read from it.
register
before
opened
% modulus
9. Objects have the property of ________although objects may know how to communicate with one another across well-defined interfaces - they normally are not allowed to know how other objects are implemented.
subscript (or index)
information hiding
template
<<
10. An expression in which all operands have the same data type - result will have the same data type as operands
like-type expression
Semicolon
type coercion
allocating memory
11. The ________ enables access to a global variable with the same name as a variable in the current scope.
sorting
Preprocessor
unary scope resolution operator (::)
classes
12. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
register
Sentinel
break
globals
13. A filestream variable that represents the default output device
polymorphism
cout
#include
Closing brace
14. Characters used to separate symbols or reserved words or identifiers and statements
whitespace
int values
char
break
15. To write data to a file you define an object of which one of the following
sorting
scope
cmath
ofstream
16. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
pointer
auto
int values
function scope
17. The address-of operator. it is used to assign pointers and to print the address of variables.
virtual functions
&
type coercion
identifiers
18. Words that are used for special purposes in a program
::
Semicolon
operator
reserved words
19. The ________ program combines the output of the compiler with various library functions to produce an executable image.
classes
linker
pointer
return
20. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
preprocessor
&
Unified Modeling Language(UML)
named constant
21. Associate an identifier with a memory location
const datatype identifier = value
allocating memory
globals
static
22. To allow file access in a program you must #include this header file.
inline functions
floating-point
fstream
function call
23. The size & shape & color and weight of an object are considered
attributes
const
named constant
definition
24. 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
token
ofstream
static
25. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
syntax
register
0
cin >> variable
26. 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.
inheritance
reserve words
attributes
Stack overflow
27. data types that refer to numbers with decimals
.cpp
fixed
a.out
floating-point
28. The ________ of an identifier is the portion of the program in which the identifier can be used.
scope
loader
binary operator
escape sequences
29. An array that uses two subscripts is referred to as a(n) _________ array.
two-dimensional
const
operand value
type
30. This manipulator causes the field to be left-justified with padding spaces printed to the right.
left
fixed
switch
base
31. Classes can have relationships with other classes. These relationships are called ________.
cin >> variable
information hiding
associations
function parameters
32. C++ programs are normally typed into a computer using a(n) ________ program.
editor
>>
::
public
33. A memory location with a name and data type - its content may be changed during program execution
source file
variable
linker
rand
34. All ______ must be declared before they are used.
variables
>>
pointer
this
35. The escape sequence ___ when output with cout and the stream insertion operator - causes the cursor to position to the beginning of the next line on the screen.
NULL
cout
/n
Closing brace
36. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
::
arithmetic expression
.cpp
this
37. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
const datatype identifier = value
type
#include
globals
38. Class members specified as _________ are accessible anywhere an object of the class is in scope.
dot (.)
attributes
public
classes
39. The symbol for the binary scope resolution operator
scope resolution operator
::
*
address
40. A function that can be used to read character data including whitespace
static_cast<char>(65)
cin.get(ch)
&
rand
41. Every C++ statement ends with a(n) _________.
function parameters
static
void
semicolon
42. = & | are examples of ____________.
if...else
void
whitespace
special symbols
43. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
main
char
floating-point
escape sequences
44. A function that calls itself
recursive function
allocating memory
mixed expression
setw
45. The _________ begins the body of every function and the _________ ends the body of every function.
fstream
syntax
main
{ }
46. Compares two strings and returns 0 if they are equal.
selection
strcmp()
assignment
local variable
47. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
template
const
//
rand
48. A __________ data member represents class-wide information.
cin
srand
static
register
49. __________ can be used to assign an object of a class to another object of the same class.
<<
int values
unary scope resolution operator (::)
Default memberwise assignment
50. The ________ program transfers the executable image of a C++ program from disk to memory.
heap
% modulus
polymorphism
loader
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