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 __________ should be used to declare the size of an array because it makes the program more scalable.
auto
strlen()
constant variable
this
2. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
address
register
pointer
static
3. Nonexecutable statements that are included in a program to provide information about what the program does etc.
comments
return
operator overloading
two-dimensional
4. Classes can have relationships with other classes. These relationships are called ________.
register
associations
local variable
<<
5. 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.
getline
/n
pointer
object file
6. A function is invoked with a ________.
scope
NULL
rand
function call
7. A pointer is a variable that contains as its value the____________ of another variable.
cin >> variable
address
#include <headerfilename>
cmath
8. tab
return
0
preprocessor
t
9. Initializers __________ must be used to initialize constant members of a class.
#include directive
member
heap
fixed
10. 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 overloading
static
overloading
Arithmetic Operators
11. Used to qualify hidden names so that they can be used.
scope resolution operator
static_cast<char>(65)
escape sequences
Counter-controlled or definite
12. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
globals
return
this
private
13. The process of determining if an array contains a particular key value is called _________ the array.
attributes
cmath
searching
operator
14. Compares two strings and returns 0 if they are equal.
binary operator
named constant
strcmp()
if...else
15. __________ can be used to assign an object of a class to another object of the same class.
Default memberwise assignment
vectors
subscript (or index)
Literals
16. 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.
cin >> variable
void
n
continue
17. The stream insertion operator
const
<<
linker
Default memberwise assignment
18. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
heap
type coercion
friend
{ }
19. directive A statement that starts with a # is called a ____________.
reserved words
Preprocessor
Sentinel
constant variable
20. This manipulator is used to establish a field width for the value immediately following it.
NULL
setw
Stack overflow
*
21. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
/n
return
escape sequences
operator overloading
22. Executable version of program
<<
sorting
base class
object file
23. The only integer that can be assigned directly to a pointer is_____________.
beginning
0
semicolon
recursive
24. newline
cin.get(ch)
n
member
const
25. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
two-dimensional
Arithmetic Operators
semantics
assignment statement
26. A set of values together with a set of operations
Literals
?
data type
strlen()
27. Used for function calls and local variables
classes
stack
member
void
28. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
definition
derived class
integer operands
recursive
29. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
information hiding
stack
Default memberwise assignment
function scope
30. All C++ Variables are_________.
case sensitive
const
?
&
31. Program components in C++ are called functions and ________.
comments
delete
classes
before
32. The process of analyzing and designing a system from an object-oriented point of view is called ________.
dot (.)
object-oriented analysis and design (OOAD)
const
two-dimensional
33. The storage-class specifiers are mutable - auto - ________ - extern and static.
register
#include <headerfilename>
allocating memory
t
34. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
strlen()
address
#include
showpoint
35. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
binary operator
if...else
comments
void
36. Use 2 characters to represent one
rand
const
escape sequences
assignment statement
37. To explicitly indicate that a value is to be converted to another type
variables
function prototype
n
type casting (conversion)
38. Symbol that denotes an action to be performed
escape sequences
operator
syntax
delete
39. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
pointer
Arithmetic Operators
non-static
Sentinel
40. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
type
const datatype identifier = value
//
::
41. The size & shape & color and weight of an object are considered
object file
scope resolution operator
void pointer
attributes
42. Preprocessor directive syntax
reserved words
#include <headerfilename>
left
initialized
43. Words that are used for special purposes in a program
main
reserved words
constant variable
setw
44. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
allocating memory
rand
function overloading
Stack overflow
45. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
left
if
const datatype identifier = value
token
46. Type casting syntax
strcmp()
static_cast<char>(65)
semantics
<<
47. This is used to mark the end of a complete C++ programming statement.
Sentinel
switch
mixed expression
Semicolon
48. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
template
semicolon
overloading
char
49. 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
before
base
new line
if
50. When a value of one data type is implicitly (automatically) changed to another data type
this
type coercion
unary scope resolution operator (::)
Semicolon
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