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 that can be used to read character data including whitespace
like-type expression
cin
cin.get(ch)
static
2. Initializers __________ must be used to initialize constant members of a class.
non-static
member
const
#include <headerfilename>
3. The symbol for the binary scope resolution operator
function scope
reserve words
//
::
4. directive A statement that starts with a # is called a ____________.
loader
const datatype identifier = value
Preprocessor
*
5. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
>>
member
% modulus
Unified Modeling Language(UML)
6. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
recursive
::
token
base class
7. The stream extraction operator
#include
identifiers
>>
#include directive
8. A file must be ________ before data can be written to or read from it.
opened
Literals
reserve words
before
9. In inheritance the ____________ is the class that supplies the inherited members.
base class
a.out
mixed expression
semicolon
10. Identifier or expression that is part of the calculation to be performed
semicolon
operand value
t
recursive function
11. When a value of one data type is implicitly (automatically) changed to another data type
polymorphism
rand
getline
type coercion
12. Most calculations are normally performed by ______ statements.
assignment
operand value
this
attributes
13. The modulus operator (%) can be used only with __________.
searching
function parameters
classes
integer operands
14. For every opening brace in a C++ program there must be a ______________.
{ }
Counter-controlled or definite
scope resolution operator
Closing brace
15. Names of things that are used in a program - can apply to variables & constants and functions
local variable
this
identifiers
if
16. 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.
reserved words
preprocessor
Sentinel
dot (.)
17. An array that uses two subscripts is referred to as a(n) _________ array.
return
two-dimensional
NULL
break
18. A variable declared outside any block or function is a ________ variable.
% modulus
*
#include
global
19. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
classes
reserved words
searching
polymorphism
20. A filestream variable that represents the default output device
arithmetic expression
this
classes
cout
21. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
globals
assignment
arithmetic expression
definition
22. A pointer is a variable that contains as its value the____________ of another variable.
cin
//
loader
address
23. You can declare default values for a function in the ____________________.
operand value
attributes
Sentinel
function parameters
24. All ______ must be declared before they are used.
address
Default memberwise assignment
function parameters
variables
25. Function ________ is used to produce random numbers.
rand
&
syntax
Arithmetic Operators
26. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
cin >> variable
named constant
source file
&
27. This is used to mark the end of a complete C++ programming statement.
n
strcpy()
<<
Semicolon
28. A __________ data member represents class-wide information.
dot (.)
virtual functions
sorting
static
29. An expression in which all operands have the same data type - result will have the same data type as operands
reserved words
overloading
like-type expression
&
30. The address-of operator. it is used to assign pointers and to print the address of variables.
&
like-type expression
scope
sorting
31. tab
template
overloading
globals
t
32. 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.
base class
inline functions
static
reserved words
33. Symbol that denotes an action to be performed
operator
local variable
strcpy()
inheritance
34. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
mixed expression
break
0
private
35. Sets floating-point values to a fixed decimal format
t
fixed
Stack overflow
overloading
36. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
showpoint
function overloading
Default memberwise assignment
*
37. A constant object must be __________; it cannot be modified after it is created.
initialized
ofstream
prompt
subscript (or index)
38. A human readable file that contains C++ program
switch
cmath
source file
mixed expression
39. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
constant variable
NULL
//
cmath
40. The ________ program transfers the executable image of a C++ program from disk to memory.
function prototype
char
loader
setw
41. Whole numbers - no decimals and no commas included
return
vectors
int values
cin >> variable
42. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
function parameters
this
Counter-controlled or definite
main
43. Allows the programmer to store a value in a variable
switch
classes
assignment statement
int values
44. 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.
?
srand
inheritance
globals
45. To allow file access in a program you must #include this header file.
Default memberwise assignment
inline functions
fstream
cin >> variable
46. Used for dynamically allocated variables
n
t
heap
showpoint
47. The sign you use for pointers
showpoint
*
sorting
cin >> variable
48. To explicitly indicate that a value is to be converted to another type
&
operand value
return
type casting (conversion)
49. Nonexecutable statements that are included in a program to provide information about what the program does etc.
char
comments
Semicolon
#include directive
50. An expression that has operands with different data types
mixed expression
Stack overflow
?
register
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