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. C++ programs are normally typed into a computer using a(n) ________ program.
selection
left
editor
void
2. The _________ begins the body of every function and the _________ ends the body of every function.
Stack overflow
>>
main
{ }
3. You must have a ___________ for every variable you intend to use in a program
dot (.)
function parameters
.cpp
definition
4. A type of pointer that can point at objects of any data type.
named constant
break
derived class
void pointer
5. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
rand
break
dot (.)
&
6. A filestream variable that represents the default output device
const
pointer
cout
static
7. 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.
prompt
variables
definition
static
8. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
loader
address
return
&
9. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
preprocessor
function scope
operator overloading
data type
10. A filestream variable that represents the default input source
virtual functions
Unified Modeling Language(UML)
cin
globals
11. Nonexecutable statements that are included in a program to provide information about what the program does etc.
member
#include <headerfilename>
special symbols
comments
12. Classes can have relationships with other classes. These relationships are called ________.
case sensitive
public
associations
#include
13. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
return
Unified Modeling Language(UML)
cout
srand
14. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
preprocessor
comments
case sensitive
const
15. Symbol that denotes an action to be performed
strcmp()
operator
/n
pointer
16. 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.
pointer
case sensitive
/n
attributes
17. directive A statement that starts with a # is called a ____________.
ofstream
<<
Default memberwise assignment
Preprocessor
18. The modulus operator (%) can be used only with __________.
integer operands
identifiers
left
assignment statement
19. data types that refer to numbers with decimals
if
fstream
floating-point
definition
20. Grammar rules of the language; compiler will try to identify and locate syntax errors
operator overloading
syntax
definition
attributes
21. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
global
recursive
strlen()
function call
22. The storage-class specifiers are mutable - auto - ________ - extern and static.
function overloading
getline
.cpp
register
23. Syntax for named constant declaration
sorting
const datatype identifier = value
heap
variable
24. Creates a copy of a string.
strcpy()
sorting
new line
Default memberwise assignment
25. When it is not known in advance how many times a set of statements will be repeated a _________value can be used to terminate the repetition.
Sentinel
editor
?
selection
26. The process of placing the elements of an array in order is called ________ the array.
sorting
left
initialized
function prototype
27. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
static_cast<char>(65)
named constant
this
identifiers
28. Returns the length of a string excluding the null terminator.
polymorphism
strlen()
const
semicolon
29. 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
.cpp
static
0
30. The three values that can be used to initialize a pointer are 0 - __________ and an address.
NULL
associations
<<
data type
31. Function ________ is used to produce random numbers.
cin >> variable
endl (same as 'n')
unary scope resolution operator (::)
rand
32. Characters used to separate symbols or reserved words or identifiers and statements
whitespace
overloading
operator
globals
33. Default name of executable file
mixed expression
classes
a.out
attributes
34. __________ can be used to assign an object of a class to another object of the same class.
allocating memory
globals
Default memberwise assignment
case sensitive
35. Message displayed to the screen asking user for input; generated with an output statement
prompt
semantics
information hiding
two-dimensional
36. A memory location with a name and data type - its content may be changed during program execution
variable
preprocessor
scope resolution operator
information hiding
37. Header file that contains commonly performed mathematical functions
editor
cmath
::
ofstream
38. A set of values together with a set of operations
semantics
/n
a.out
data type
39. 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.
&
object-oriented analysis and design (OOAD)
Closing brace
information hiding
40. To explicitly indicate that a value is to be converted to another type
type casting (conversion)
switch
virtual functions
if
41. Executable version of program
Closing brace
return
like-type expression
object file
42. The symbol for the binary scope resolution operator
unary operator
Literals
::
strcpy()
43. In inheritance the ____________ is the class the receives the inherited members.
searching
derived class
polymorphism
strcpy()
44. The process of analyzing and designing a system from an object-oriented point of view is called ________.
object-oriented analysis and design (OOAD)
function parameters
floating-point
mixed expression
45. The ________ enables access to a global variable with the same name as a variable in the current scope.
mixed expression
unary scope resolution operator (::)
linker
public
46. The stream extraction operator
void
special symbols
void
>>
47. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
selection
default constructor
char
sorting
48. The ________ qualifier is used to declare read-only variables.
opened
function parameters
const
operator overloading
49. 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.
/n
endl (same as 'n')
virtual functions
loader
50. A program that finds and attaches to your program the indicated libraries for compilation
if...else
function prototype
>>
preprocessor
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