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. 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.
left
/n
beginning
inheritance
2. The symbol for the binary scope resolution operator
operator overloading
NULL
Arithmetic Operators
::
3. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
function overloading
main
friend
Stack overflow
4. Header file that contains commonly performed mathematical functions
default constructor
cout
*
cmath
5. The ________ qualifier is used to declare read-only variables.
register
fstream
const
vectors
6. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
function overloading
comments
mixed expression
break
7. Preprocessor directive syntax
function overloading
main
variable
#include <headerfilename>
8. The ________ of an identifier is the portion of the program in which the identifier can be used.
unary operator
Semicolon
function overloading
scope
9. Operator with only one operand
Arithmetic Operators
unary operator
semicolon
recursive function
10. 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.
void
overloading
searching
endl (same as 'n')
11. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
overloading
allocating memory
global
return
12. Naming convention for C++ programs
information hiding
&
.cpp
void pointer
13. All ______ must be declared before they are used.
special symbols
?
% modulus
variables
14. The _________ begins the body of every function and the _________ ends the body of every function.
#include
{ }
const datatype identifier = value
rand
15. C++ programs are normally typed into a computer using a(n) ________ program.
allocating memory
editor
heap
//
16. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
two-dimensional
register
pointer
Counter-controlled or definite
17. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
function scope
assignment
binary operator
Stack overflow
18. This is used to mark the end of a complete C++ programming statement.
global
searching
member
Semicolon
19. Associate an identifier with a memory location
derived class
allocating memory
sorting
scope resolution operator
20. Every C++ statement ends with a(n) _________.
whitespace
% modulus
semicolon
vectors
21. Syntax for named constant declaration
const datatype identifier = value
semantics
editor
scope
22. To allow file access in a program you must #include this header file.
fstream
case sensitive
main
data type
23. These are data items whose values do not change while the program is running
special symbols
{ }
Literals
static
24. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
type
constant variable
object-oriented analysis and design (OOAD)
if...else
25. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
private
Counter-controlled or definite
ofstream
char
26. 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.
dot (.)
associations
fixed
char
27. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
//
scope resolution operator
function prototype
0
28. Two slash marks ( // ) indicate __________ of a comment
strlen()
beginning
before
fixed
29. 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
30. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
if...else
semantics
srand
virtual functions
31. A C++ statement that makes a decision is ______.
if
unary scope resolution operator (::)
named constant
&
32. A filestream variable that represents the default input source
continue
switch
break
cin
33. The stream insertion operator
void
.cpp
<<
void pointer
34. A variable that is known only within the function in which it is defined is called a ________.
a.out
n
non-static
local variable
35. data types that refer to numbers with decimals
variables
<<
floating-point
#include
36. A file must be ________ before data can be written to or read from it.
static_cast<char>(65)
base class
opened
auto
37. The storage-class specifiers are mutable - auto - ________ - extern and static.
register
Literals
return
t
38. A human readable file that contains C++ program
source file
polymorphism
unary scope resolution operator (::)
heap
39. The process of determining if an array contains a particular key value is called _________ the array.
non-static
inline functions
searching
Closing brace
40. The __________ operator reclaims memory previously allocated by new.
this
sorting
delete
setw
41. This manipulator causes the field to be left-justified with padding spaces printed to the right.
#include directive
Arithmetic Operators
derived class
left
42. Used for dynamically allocated variables
main
const
global
heap
43. The process of placing the elements of an array in order is called ________ the array.
sorting
operator
::
Semicolon
44. The three values that can be used to initialize a pointer are 0 - __________ and an address.
unary operator
if
case sensitive
NULL
45. The sign you use for pointers
type coercion
*
strlen()
variables
46. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
classes
auto
char
getline
47. Whole numbers - no decimals and no commas included
int values
static
global
mixed expression
48. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
integer operands
function prototype
getline
opened
49. The address-of operator. it is used to assign pointers and to print the address of variables.
if
&
fixed
void
50. A filestream variable that represents the default output device
cout
virtual functions
fstream
arithmetic expression
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