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 ________ of an identifier is the portion of the program in which the identifier can be used.
.cpp
scope
int values
opened
2. Grammar rules of the language; compiler will try to identify and locate syntax errors
global
escape sequences
syntax
integer operands
3. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
overloading
//
int values
strcmp()
4. A constant object must be __________; it cannot be modified after it is created.
initialized
scope resolution operator
searching
template
5. Message displayed to the screen asking user for input; generated with an output statement
prompt
?
this
cin >> variable
6. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
void
reserved words
pointer
&
7. The stream extraction operator
recursive function
>>
const
static
8. In inheritance the ____________ is the class the receives the inherited members.
type casting (conversion)
&
classes
derived class
9. Naming convention for C++ programs
a.out
associations
.cpp
access specifier
10. Names of things that are used in a program - can apply to variables & constants and functions
identifiers
.cpp
recursive
this
11. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
register
friend
operator overloading
globals
12. A type of pointer that can point at objects of any data type.
cin.get(ch)
void pointer
setw
public
13. 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.
scope
derived class
allocating memory
static
14. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
int values
register
unary scope resolution operator (::)
classes
15. A function is invoked with a ________.
virtual functions
object-oriented analysis and design (OOAD)
if
function call
16. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
editor
data type
?
cin >> variable
17. When it is not known in advance how many times a set of statements will be repeated a _________value can be used to terminate the repetition.
Sentinel
default constructor
member
semantics
18. The _________ begins the body of every function and the _________ ends the body of every function.
{ }
inline functions
template
function prototype
19. The process of analyzing and designing a system from an object-oriented point of view is called ________.
new line
object-oriented analysis and design (OOAD)
reserve words
Arithmetic Operators
20. Preprocessor directive syntax
public
.cpp
#include <headerfilename>
static
21. The ________ qualifier is used to declare read-only variables.
const
Closing brace
special symbols
subscript (or index)
22. An array that uses two subscripts is referred to as a(n) _________ array.
type coercion
two-dimensional
fstream
const
23. newline
variables
n
sorting
showpoint
24. Two slash marks ( // ) indicate __________ of a comment
reserved words
beginning
sorting
Preprocessor
25. You can declare default values for a function in the ____________________.
data type
function parameters
associations
friend
26. Executable version of program
case sensitive
friend
fstream
object file
27. These are data items whose values do not change while the program is running
.cpp
preprocessor
Literals
mixed expression
28. To write data to a file you define an object of which one of the following
inline functions
integer operands
ofstream
#include
29. The size & shape & color and weight of an object are considered
attributes
virtual functions
int values
strlen()
30. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
selection
dot (.)
local variable
const
31. Nonexecutable statements that are included in a program to provide information about what the program does etc.
variables
operator
new line
comments
32. 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
33. 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.
private
loader
information hiding
switch
34. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
Stack overflow
private
function prototype
const
35. The process of placing the elements of an array in order is called ________ the array.
strcpy()
sorting
beginning
base class
36. A variable declared outside any block or function is a ________ variable.
associations
switch
//
global
37. Program components in C++ are called functions and ________.
::
inline functions
classes
register
38. A memory location with a name and data type - its content may be changed during program execution
?
this
function prototype
variable
39. This is used to mark the end of a complete C++ programming statement.
strcmp()
Semicolon
whitespace
initialized
40. Whole numbers - no decimals and no commas included
cin.get(ch)
sorting
int values
% modulus
41. For every opening brace in a C++ program there must be a ______________.
Closing brace
.cpp
//
comments
42. A __________ should be used to declare the size of an array because it makes the program more scalable.
token
constant variable
Counter-controlled or definite
main
43. Default name of executable file
a.out
static
local variable
searching
44. The modulus operator (%) can be used only with __________.
char
case sensitive
getline
integer operands
45. In inheritance the ____________ is the class that supplies the inherited members.
linker
base class
case sensitive
semantics
46. A C++ statement that makes a decision is ______.
if
allocating memory
static
mixed expression
47. data types that refer to numbers with decimals
function call
local variable
floating-point
member
48. The idea that you can call the same function and the output will depend on the type of object you're using.
polymorphism
comments
searching
preprocessor
49. A member function should be declared static if it does not access __________ class members.
char
non-static
0
const datatype identifier = value
50. A filestream variable that represents the default output device
variable
showpoint
cin >> variable
cout
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