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. directive A statement that starts with a # is called a ____________.
#include directive
unary scope resolution operator (::)
this
Preprocessor
2. A variable that holds the address of another variable.
continue
pointer
#include <headerfilename>
binary operator
3. The process of placing the elements of an array in order is called ________ the array.
sorting
recursive function
const
Preprocessor
4. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
beginning
mixed expression
register
cin >> variable
5. Every C++ statement ends with a(n) _________.
syntax
inheritance
associations
semicolon
6. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
private
strcpy()
#include directive
scope
7. Default name of executable file
Unified Modeling Language(UML)
a.out
private
this
8. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
named constant
source file
opened
a.out
9. Used for dynamically allocated variables
operand value
operator
heap
Default memberwise assignment
10. In inheritance the ____________ is the class the receives the inherited members.
subscript (or index)
base
derived class
non-static
11. A constant object must be __________; it cannot be modified after it is created.
initialized
heap
variables
int values
12. The process of analyzing and designing a system from an object-oriented point of view is called ________.
0
object-oriented analysis and design (OOAD)
continue
overloading
13. * / % + -
Arithmetic Operators
editor
member
whitespace
14. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
new line
non-static
preprocessor
polymorphism
15. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
#include
NULL
function overloading
char
16. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
endl (same as 'n')
break
arithmetic expression
#include <headerfilename>
17. The stream insertion operator
beginning
data type
<<
base class
18. The size & shape & color and weight of an object are considered
Sentinel
Semicolon
attributes
syntax
19. A recursive function typically has two components: One that provides a means for the recursion to terminate by testing for a(n) ________ case and one that expresses the problem as a recursive call for a slightly simpler problem than the original call
base
showpoint
vectors
template
20. The idea that you can call the same function and the output will depend on the type of object you're using.
polymorphism
operand value
beginning
recursive function
21. int namespace include using return examples of ___________
scope
variables
reserve words
overloading
22. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
variable
whitespace
operator overloading
global
23. A file must be ________ before data can be written to or read from it.
sorting
function prototype
opened
function parameters
24. 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.
/n
default constructor
continue
new line
25. Creates a copy of a string.
strcpy()
reserved words
attributes
associations
26. Whole numbers - no decimals and no commas included
*
int values
selection
prompt
27. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
dot (.)
fixed
pointer
inheritance
28. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
fixed
inline functions
Unified Modeling Language(UML)
data type
29. Class members specified as _________ are accessible anywhere an object of the class is in scope.
strlen()
pointer
token
public
30. A function is invoked with a ________.
type coercion
>>
unary operator
function call
31. 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.
const datatype identifier = value
special symbols
strcpy()
static
32. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
initialized
floating-point
getline
cout
33. The symbol for the binary scope resolution operator
case sensitive
whitespace
this
::
34. Characters used to separate symbols or reserved words or identifiers and statements
whitespace
const datatype identifier = value
type casting (conversion)
subscript (or index)
35. The number used to refer to a particular element of an array is called its ________.
Semicolon
left
subscript (or index)
&
36. A type of pointer that can point at objects of any data type.
public
semantics
void pointer
const datatype identifier = value
37. 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.
Semicolon
void
mixed expression
type casting (conversion)
38. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
Literals
friend
delete
Counter-controlled or definite
39. An array that uses two subscripts is referred to as a(n) _________ array.
break
default constructor
two-dimensional
&
40. A human readable file that contains C++ program
subscript (or index)
cin >> variable
Arithmetic Operators
source file
41. All C++ Variables are_________.
beginning
case sensitive
preprocessor
polymorphism
42. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
recursive function
function overloading
Literals
return
43. These are data items whose values do not change while the program is running
identifiers
function scope
Literals
scope resolution operator
44. Allows the programmer to store a value in a variable
beginning
main
const datatype identifier = value
assignment statement
45. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
&
const datatype identifier = value
initialized
//
46. The stream extraction operator
object-oriented analysis and design (OOAD)
type
default constructor
>>
47. If a member initializer is not provided for a member object of a class the object's __________ is called.
attributes
pointer
default constructor
% modulus
48. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
whitespace
endl (same as 'n')
linker
const
49. Operator with only one operand
cout
NULL
Counter-controlled or definite
unary operator
50. The ________ enables access to a global variable with the same name as a variable in the current scope.
unary scope resolution operator (::)
globals
const
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