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. Classes can have relationships with other classes. These relationships are called ________.
assignment
subscript (or index)
operator
associations
2. The ________ qualifier is used to declare read-only variables.
const datatype identifier = value
{ }
function scope
const
3. Creates a copy of a string.
comments
special symbols
strcpy()
pointer
4. The process of placing the elements of an array in order is called ________ the array.
public
sorting
new line
loader
5. This is used to mark the end of a complete C++ programming statement.
Semicolon
cin.get(ch)
cin
comments
6. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
whitespace
<<
#include
inline functions
7. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
#include
#include <headerfilename>
mixed expression
char
8. Characters used to separate symbols or reserved words or identifiers and statements
constant variable
friend
whitespace
variable
9. The __________ operator reclaims memory previously allocated by new.
token
cin.get(ch)
void
delete
10. The modulus operator (%) can be used only with __________.
variables
polymorphism
integer operands
assignment
11. To write data to a file you define an object of which one of the following
const
constant variable
ofstream
.cpp
12. Repeating a set of instructions a specific number of times is called_________repetition.
Counter-controlled or definite
friend
identifiers
this
13. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
const datatype identifier = value
function scope
#include
whitespace
14. A constant object must be __________; it cannot be modified after it is created.
initialized
dot (.)
?
base class
15. A function is invoked with a ________.
void pointer
strcpy()
Closing brace
function call
16. Forces the computer to display decimal point and trailing zeroes
showpoint
static
recursive
n
17. * / % + -
const datatype identifier = value
new line
Semicolon
Arithmetic Operators
18. 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.
static
continue
assignment statement
const
19. Every C++ statement ends with a(n) _________.
case sensitive
opened
semicolon
two-dimensional
20. The idea that you can call the same function and the output will depend on the type of object you're using.
constant variable
polymorphism
const
base
21. The ________ enables access to a global variable with the same name as a variable in the current scope.
unary scope resolution operator (::)
escape sequences
t
strcmp()
22. To allow file access in a program you must #include this header file.
friend
constant variable
fstream
comments
23. data types that refer to numbers with decimals
member
register
like-type expression
floating-point
24. An expression in which all operands have the same data type - result will have the same data type as operands
like-type expression
searching
member
object-oriented analysis and design (OOAD)
25. A member function should be declared static if it does not access __________ class members.
identifiers
default constructor
template
non-static
26. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
recursive
continue
static
function call
27. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
scope
unary operator
srand
if...else
28. A sequence of operands and operators that describe a calculation to be performed
arithmetic expression
register
return
like-type expression
29. The only integer that can be assigned directly to a pointer is_____________.
vectors
0
linker
?
30. Initializers __________ must be used to initialize constant members of a class.
member
register
editor
global
31. The three values that can be used to initialize a pointer are 0 - __________ and an address.
?
Literals
NULL
<<
32. The ________ of an identifier is the portion of the program in which the identifier can be used.
scope
recursive function
integer operands
preprocessor
33. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
srand
friend
vectors
Sentinel
34. Default name of executable file
function overloading
a.out
initialized
switch
35. You must have a ___________ for every variable you intend to use in a program
strlen()
endl (same as 'n')
constant variable
definition
36. 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
operand value
{ }
escape sequences
37. A function that can be used to read character data including whitespace
friend
cin.get(ch)
preprocessor
assignment
38. Keyword public is a(n) _________
access specifier
function parameters
vectors
% modulus
39. A variable that holds the address of another variable.
binary operator
pointer
Sentinel
mixed expression
40. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
this
const
type casting (conversion)
searching
41. The conditional operator. it evaluates a line of code and returns one thing if the condition is true and a different thing if the condition is false.
function call
if...else
?
template
42. The stream extraction operator
continue
vectors
>>
function scope
43. The _________ begins the body of every function and the _________ ends the body of every function.
{ }
vectors
case sensitive
strcpy()
44. Member objects are constructed __________ their enclosing class object.
t
//
before
new line
45. When a value of one data type is implicitly (automatically) changed to another data type
type coercion
mixed expression
inline functions
const
46. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
&
cin
function prototype
arithmetic expression
47. Syntax for named constant declaration
continue
subscript (or index)
const datatype identifier = value
ofstream
48. 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.
void
function overloading
associations
information hiding
49. Names of things that are used in a program - can apply to variables & constants and functions
global
variable
int values
identifiers
50. 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.
continue
friend
strcmp()
int values
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