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. All C++ Variables are_________.
case sensitive
globals
selection
editor
2. Two slash marks ( // ) indicate __________ of a comment
register
semantics
beginning
before
3. 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.
operand value
dot (.)
unary scope resolution operator (::)
recursive function
4. Initializers __________ must be used to initialize constant members of a class.
constant variable
member
comments
continue
5. Creates a copy of a string.
#include <headerfilename>
associations
identifiers
strcpy()
6. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
if
char
classes
object file
7. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
polymorphism
searching
type coercion
token
8. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
function scope
n
.cpp
searching
9. The sign you use for pointers
operator
Default memberwise assignment
*
ofstream
10. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
like-type expression
Counter-controlled or definite
base
return
11. A C++ statement that makes a decision is ______.
if
classes
/n
static_cast<char>(65)
12. The ________ qualifier is used to declare read-only variables.
prompt
showpoint
const
{ }
13. Operator with two operands
//
binary operator
template
address
14. A file must be ________ before data can be written to or read from it.
opened
recursive
const
cin.get(ch)
15. Type casting syntax
.cpp
object file
initialized
static_cast<char>(65)
16. The size & shape & color and weight of an object are considered
attributes
getline
variables
fstream
17. The _____ causes the contents of another file to be inserted into a program.
base class
pointer
#include directive
like-type expression
18. 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
global
linker
base
source file
19. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
operand value
dot (.)
new line
attributes
20. Every C++ statement ends with a(n) _________.
semicolon
function scope
srand
#include
21. The ________ enables access to a global variable with the same name as a variable in the current scope.
variable
unary scope resolution operator (::)
return
associations
22. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
this
globals
::
Preprocessor
23. For every opening brace in a C++ program there must be a ______________.
opened
base
stack
Closing brace
24. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
prompt
function overloading
/n
return
25. The ________ program transfers the executable image of a C++ program from disk to memory.
classes
whitespace
floating-point
loader
26. An expression in which all operands have the same data type - result will have the same data type as operands
member
like-type expression
void
auto
27. When a value of one data type is implicitly (automatically) changed to another data type
n
pointer
identifiers
type coercion
28. This manipulator is used to establish a field width for the value immediately following it.
globals
setw
void
Sentinel
29. The __________ operator reclaims memory previously allocated by new.
access specifier
operand value
delete
semicolon
30. Use 2 characters to represent one
two-dimensional
Counter-controlled or definite
token
escape sequences
31. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
void
binary operator
//
Default memberwise assignment
32. The ________ of an identifier is the portion of the program in which the identifier can be used.
opened
attributes
scope
stack
33. data types that refer to numbers with decimals
floating-point
endl (same as 'n')
constant variable
switch
34. Forces the computer to display decimal point and trailing zeroes
preprocessor
fstream
showpoint
local variable
35. Syntax for named constant declaration
assignment statement
void pointer
const datatype identifier = value
return
36. C++ programs are normally typed into a computer using a(n) ________ program.
return
globals
editor
searching
37. Words that are used for special purposes in a program
reserved words
fstream
token
getline
38. Used to qualify hidden names so that they can be used.
selection
/n
scope resolution operator
<<
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.
static_cast<char>(65)
case sensitive
information hiding
preprocessor
40. Keyword public is a(n) _________
local variable
preprocessor
Sentinel
access specifier
41. Returns the length of a string excluding the null terminator.
/n
function prototype
strlen()
searching
42. The elements of an array are related by the fact that they have the same name and ___________.
default constructor
linker
type
srand
43. An operator that can only be used with int values. result will always be an int.
{ }
new line
% modulus
type casting (conversion)
44. The number used to refer to a particular element of an array is called its ________.
void
local variable
{ }
subscript (or index)
45. A pointer is a variable that contains as its value the____________ of another variable.
NULL
main
*
address
46. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
operator overloading
semantics
if...else
vectors
47. Naming convention for C++ programs
Semicolon
function parameters
classes
.cpp
48. A memory location with a name and data type - its content may be changed during program execution
overloading
?
cin >> variable
variable
49. A type of pointer that can point at objects of any data type.
void pointer
public
globals
% modulus
50. 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
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