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 keyword __________ specifies that an object or variable is not modifiable after it is initialized.
integer operands
strcpy()
associations
const
2. You can declare default values for a function in the ____________________.
mixed expression
arithmetic expression
constant variable
function parameters
3. The ________ program transfers the executable image of a C++ program from disk to memory.
data type
#include <headerfilename>
getline
loader
4. Creates a copy of a string.
strcpy()
if
dot (.)
special symbols
5. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
Semicolon
type casting (conversion)
Arithmetic Operators
auto
6. Member objects are constructed __________ their enclosing class object.
associations
type coercion
before
sorting
7. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
void
before
syntax
rand
8. Sets floating-point values to a fixed decimal format
fixed
variable
Semicolon
whitespace
9. In inheritance the ____________ is the class the receives the inherited members.
definition
<<
if
derived class
10. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
cmath
function overloading
reserve words
private
11. = & | are examples of ____________.
classes
static
special symbols
virtual functions
12. To write data to a file you define an object of which one of the following
ofstream
stack
int values
globals
13. C++ programs are normally typed into a computer using a(n) ________ program.
data type
variable
vectors
editor
14. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
virtual functions
assignment
fixed
function prototype
15. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
assignment statement
0
&
pointer
16. Type casting syntax
register
main
static_cast<char>(65)
linker
17. newline
n
special symbols
non-static
editor
18. When a value of one data type is implicitly (automatically) changed to another data type
inheritance
strcmp()
Default memberwise assignment
type coercion
19. A human readable file that contains C++ program
return
source file
initialized
reserve words
20. These are data items whose values do not change while the program is running
Literals
globals
escape sequences
if...else
21. Class members specified as _________ are accessible anywhere an object of the class is in scope.
Unified Modeling Language(UML)
public
if
#include directive
22. The stream insertion operator
<<
function overloading
const
object file
23. Lists and tables of values can be stored in arrays or __________.
main
vectors
virtual functions
template
24. If a member initializer is not provided for a member object of a class the object's __________ is called.
default constructor
return
sorting
comments
25. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
Closing brace
fixed
overloading
Counter-controlled or definite
26. Used for dynamically allocated variables
heap
strcpy()
left
new line
27. A pointer is a variable that contains as its value the____________ of another variable.
address
source file
definition
strcpy()
28. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
Closing brace
operator overloading
cmath
pointer
29. Whole numbers - no decimals and no commas included
cin >> variable
int values
const
NULL
30. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
strlen()
if...else
.cpp
type
31. int namespace include using return examples of ___________
comments
if
reserve words
this
32. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
cin.get(ch)
const
switch
&
33. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
char
function scope
% modulus
access specifier
34. The number used to refer to a particular element of an array is called its ________.
friend
sorting
srand
subscript (or index)
35. This manipulator is used to establish a field width for the value immediately following it.
template
Preprocessor
setw
data type
36. The ________ enables access to a global variable with the same name as a variable in the current scope.
unary scope resolution operator (::)
break
access specifier
a.out
37. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
semantics
pointer
special symbols
access specifier
38. Used to qualify hidden names so that they can be used.
Sentinel
default constructor
cin.get(ch)
scope resolution operator
39. 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.
&
void
::
syntax
40. A variable that is known only within the function in which it is defined is called a ________.
local variable
cmath
whitespace
function overloading
41. To allow file access in a program you must #include this header file.
setw
editor
semicolon
fstream
42. A __________ should be used to declare the size of an array because it makes the program more scalable.
constant variable
preprocessor
base class
Arithmetic Operators
43. A program that finds and attaches to your program the indicated libraries for compilation
default constructor
Arithmetic Operators
preprocessor
derived class
44. Preprocessor directive syntax
endl (same as 'n')
recursive
#include <headerfilename>
continue
45. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
getline
linker
preprocessor
cin >> variable
46. An expression that has operands with different data types
cout
mixed expression
variables
dot (.)
47. Compares two strings and returns 0 if they are equal.
source file
strcmp()
polymorphism
Literals
48. When you create a ___________________in the base class and then call it using an object the function will know to look in the inherited class for the specifics of that function.
type
virtual functions
preprocessor
void
49. A filestream variable that represents the default input source
integer operands
Unified Modeling Language(UML)
cin
cin.get(ch)
50. You must have a ___________ for every variable you intend to use in a program
pointer
definition
private
scope resolution operator
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