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. Nonexecutable statements that are included in a program to provide information about what the program does etc.
operator
comments
register
special symbols
2. A __________ should be used to declare the size of an array because it makes the program more scalable.
fstream
assignment statement
constant variable
classes
3. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
editor
selection
static_cast<char>(65)
//
4. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
named constant
break
this
{ }
5. The sign you use for references
&
local variable
fixed
object file
6. Operator with two operands
void
NULL
fstream
binary operator
7. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
getline
return
semicolon
identifiers
8. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
preprocessor
polymorphism
function overloading
continue
9. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
>>
left
virtual functions
friend
10. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
overloading
definition
&
register
11. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
editor
void
semantics
0
12. Member objects are constructed __________ their enclosing class object.
before
classes
reserve words
semantics
13. The process of analyzing and designing a system from an object-oriented point of view is called ________.
endl (same as 'n')
object-oriented analysis and design (OOAD)
void pointer
left
14. A filestream variable that represents the default output device
address
delete
heap
cout
15. The ________ statement in a called function passes the value of an expression back to the calling function.
stack
whitespace
//
return
16. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
selection
identifiers
?
editor
17. Program components in C++ are called functions and ________.
const
pointer
Closing brace
classes
18. Function ________ is used to set the random number seed to randomize a program.
before
derived class
information hiding
srand
19. Most calculations are normally performed by ______ statements.
*
const datatype identifier = value
base class
assignment
20. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
cin >> variable
a.out
void
#include <headerfilename>
21. The three values that can be used to initialize a pointer are 0 - __________ and an address.
NULL
address
/n
type
22. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
reserved words
whitespace
function prototype
dot (.)
23. The symbol for the binary scope resolution operator
::
opened
&
like-type expression
24. The ________ qualifier is used to declare read-only variables.
const
if
definition
.cpp
25. Two slash marks ( // ) indicate __________ of a comment
>>
beginning
allocating memory
definition
26. 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.
void
public
inheritance
operator overloading
27. Type casting syntax
beginning
pointer
static_cast<char>(65)
register
28. This is used to mark the end of a complete C++ programming statement.
derived class
preprocessor
const
Semicolon
29. A type of pointer that can point at objects of any data type.
strcmp()
void pointer
object file
//
30. To write data to a file you define an object of which one of the following
return
cin >> variable
ofstream
NULL
31. 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
object-oriented analysis and design (OOAD)
&
access specifier
32. For every opening brace in a C++ program there must be a ______________.
default constructor
Closing brace
definition
searching
33. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
recursive
t
public
case sensitive
34. Manipulator that causes the insertion point (cursor) to move to the beginning of the next line
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
35. Message displayed to the screen asking user for input; generated with an output statement
prompt
rand
if...else
template
36. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
function call
overloading
unary operator
identifiers
37. A function that calls itself
0
recursive function
integer operands
rand
38. Header file that contains commonly performed mathematical functions
setw
cmath
variables
register
39. 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.
prompt
object file
dot (.)
source file
40. __________ can be used to assign an object of a class to another object of the same class.
Preprocessor
Default memberwise assignment
static
cout
41. An expression in which all operands have the same data type - result will have the same data type as operands
stack
a.out
NULL
like-type expression
42. 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.
?
arithmetic expression
identifiers
heap
43. Repeating a set of instructions a specific number of times is called_________repetition.
Counter-controlled or definite
if
named constant
data type
44. Creates a copy of a string.
strcpy()
floating-point
return
this
45. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
before
recursive
>>
operator overloading
46. The stream extraction operator
static
Stack overflow
>>
n
47. The _________ begins the body of every function and the _________ ends the body of every function.
beginning
{ }
continue
definition
48. Words that are used for special purposes in a program
new line
source file
reserved words
endl (same as 'n')
49. All C++ Variables are_________.
unary scope resolution operator (::)
int values
polymorphism
case sensitive
50. Function ________ is used to produce random numbers.
access specifier
::
rand
if...else
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