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. Most calculations are normally performed by ______ statements.
assignment
strcmp()
Preprocessor
.cpp
2. OOD also takes advantage of ________ relationships where new classes of objects are derived by absorbing characteristics of existing classes - then adding unique characteristics of their own.
inheritance
information hiding
private
friend
3. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
case sensitive
reserved words
globals
const
4. This manipulator causes the field to be left-justified with padding spaces printed to the right.
classes
left
n
getline
5. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
base class
private
special symbols
cmath
6. Function ________ is used to set the random number seed to randomize a program.
static_cast<char>(65)
srand
assignment statement
semantics
7. The stream extraction operator
recursive
setw
>>
fixed
8. A __________ should be used to declare the size of an array because it makes the program more scalable.
preprocessor
vectors
constant variable
inheritance
9. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
heap
Stack overflow
comments
floating-point
10. A variable declared outside any block or function is a ________ variable.
selection
cout
classes
global
11. Characters used to separate symbols or reserved words or identifiers and statements
editor
void
data type
whitespace
12. This manipulator is used to establish a field width for the value immediately following it.
named constant
setw
n
function overloading
13. Compares two strings and returns 0 if they are equal.
strcmp()
comments
associations
dot (.)
14. 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
15. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
recursive
function overloading
>>
n
16. A file must be ________ before data can be written to or read from it.
//
opened
inheritance
token
17. Allows the programmer to store a value in a variable
assignment statement
NULL
linker
void
18. Initializers __________ must be used to initialize constant members of a class.
cout
Counter-controlled or definite
member
subscript (or index)
19. A variable that is known only within the function in which it is defined is called a ________.
operand value
fixed
local variable
#include <headerfilename>
20. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
if...else
token
data type
switch
21. 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
vectors
operator
default constructor
22. newline
left
data type
global
n
23. The symbol for the binary scope resolution operator
return
delete
::
*
24. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
sorting
0
semicolon
cin >> variable
25. Two slash marks ( // ) indicate __________ of a comment
pointer
beginning
private
friend
26. C++ programs are normally typed into a computer using a(n) ________ program.
default constructor
constant variable
editor
endl (same as 'n')
27. Type casting syntax
static_cast<char>(65)
switch
reserve words
classes
28. The ________ statement in a called function passes the value of an expression back to the calling function.
Arithmetic Operators
two-dimensional
return
initialized
29. The idea that you can call the same function and the output will depend on the type of object you're using.
&
function call
special symbols
polymorphism
30. A pointer is a variable that contains as its value the____________ of another variable.
address
special symbols
if...else
data type
31. The three values that can be used to initialize a pointer are 0 - __________ and an address.
unary scope resolution operator (::)
NULL
this
case sensitive
32. In inheritance the ____________ is the class the receives the inherited members.
derived class
before
#include directive
preprocessor
33. Symbol that denotes an action to be performed
scope resolution operator
beginning
operator
void
34. You can declare default values for a function in the ____________________.
Counter-controlled or definite
case sensitive
function parameters
recursive
35. Used to qualify hidden names so that they can be used.
scope resolution operator
main
private
friend
36. This is used to mark the end of a complete C++ programming statement.
if
n
Semicolon
token
37. Keyword public is a(n) _________
int values
mixed expression
access specifier
associations
38. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
function scope
inheritance
void
preprocessor
39. 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
register
switch
if
40. 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
auto
Stack overflow
base
base class
41. An array that uses two subscripts is referred to as a(n) _________ array.
this
two-dimensional
strlen()
/n
42. Preprocessor directive syntax
#include <headerfilename>
rand
a.out
base
43. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
selection
if...else
heap
pointer
44. * / % + -
preprocessor
Arithmetic Operators
const
classes
45. In inheritance the ____________ is the class that supplies the inherited members.
base class
escape sequences
heap
sorting
46. These are data items whose values do not change while the program is running
Literals
Closing brace
before
cin.get(ch)
47. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
register
cin
global
return
48. Creates a copy of a string.
cin.get(ch)
syntax
strcpy()
private
49. Used for dynamically allocated variables
this
heap
binary operator
pointer
50. 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.
delete
static
subscript (or index)
linker
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