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. A function is invoked with a ________.
function overloading
inheritance
function call
break
2. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
type casting (conversion)
before
auto
classes
3. The number used to refer to a particular element of an array is called its ________.
subscript (or index)
Preprocessor
setw
before
4. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
beginning
before
base
private
5. Initializers __________ must be used to initialize constant members of a class.
information hiding
sorting
selection
member
6. A C++ statement that makes a decision is ______.
scope resolution operator
ofstream
Unified Modeling Language(UML)
if
7. Creates a copy of a string.
continue
strcpy()
if
base class
8. The stream insertion operator
mixed expression
int values
information hiding
<<
9. Preprocessor directive syntax
#include
non-static
#include <headerfilename>
assignment
10. To allow file access in a program you must #include this header file.
.cpp
{ }
Semicolon
fstream
11. Used for dynamically allocated variables
mixed expression
Closing brace
rand
heap
12. The _________ begins the body of every function and the _________ ends the body of every function.
continue
binary operator
{ }
escape sequences
13. A sequence of operands and operators that describe a calculation to be performed
void
arithmetic expression
whitespace
preprocessor
14. The storage-class specifiers are mutable - auto - ________ - extern and static.
left
overloading
register
searching
15. 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.
recursive
heap
dot (.)
fstream
16. Naming convention for C++ programs
allocating memory
type coercion
binary operator
.cpp
17. A __________ data member represents class-wide information.
fixed
#include <headerfilename>
strcmp()
static
18. 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.
?
strlen()
scope resolution operator
binary operator
19. These are data items whose values do not change while the program is running
selection
definition
before
Literals
20. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
globals
friend
subscript (or index)
default constructor
21. Function ________ is used to set the random number seed to randomize a program.
function scope
//
srand
classes
22. Classes can have relationships with other classes. These relationships are called ________.
named constant
associations
recursive
*
23. 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.
operand value
prompt
virtual functions
reserve words
24. Words that are used for special purposes in a program
initialized
Stack overflow
reserved words
preprocessor
25. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
opened
strcpy()
switch
operator overloading
26. A variable that is known only within the function in which it is defined is called a ________.
function call
classes
auto
local variable
27. Header file that contains commonly performed mathematical functions
searching
loader
cmath
subscript (or index)
28. The size & shape & color and weight of an object are considered
identifiers
globals
attributes
int values
29. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
Literals
#include
derived class
break
30. A memory location with a name and data type - its content may be changed during program execution
static
variable
type casting (conversion)
srand
31. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
classes
polymorphism
inline functions
syntax
32. Returns the length of a string excluding the null terminator.
register
strlen()
n
information hiding
33. This is used to mark the end of a complete C++ programming statement.
assignment statement
srand
Sentinel
Semicolon
34. A file must be ________ before data can be written to or read from it.
variables
cout
opened
preprocessor
35. All ______ must be declared before they are used.
strlen()
semantics
whitespace
variables
36. A variable that holds the address of another variable.
Semicolon
n
this
pointer
37. The modulus operator (%) can be used only with __________.
public
opened
integer operands
globals
38. Function ________ is used to produce random numbers.
cout
*
rand
auto
39. You can declare default values for a function in the ____________________.
continue
strcpy()
function parameters
#include directive
40. A set of values together with a set of operations
inline functions
data type
::
allocating memory
41. A function that can be used to read character data including whitespace
address
cin >> variable
local variable
cin.get(ch)
42. directive A statement that starts with a # is called a ____________.
binary operator
Semicolon
searching
Preprocessor
43. The process of analyzing and designing a system from an object-oriented point of view is called ________.
register
new line
object-oriented analysis and design (OOAD)
allocating memory
44. Compares two strings and returns 0 if they are equal.
operator
strcmp()
#include <headerfilename>
int values
45. In inheritance the ____________ is the class that supplies the inherited members.
beginning
comments
rand
base class
46. A pointer is a variable that contains as its value the____________ of another variable.
address
static
scope resolution operator
reserved words
47. Sets floating-point values to a fixed decimal format
fixed
{ }
int values
source file
48. Operator with only one operand
selection
static
escape sequences
unary operator
49. To write data to a file you define an object of which one of the following
ofstream
showpoint
Closing brace
operand value
50. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
Literals
/n
inline functions
const
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