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 ______ must be declared before they are used.
function scope
variables
constant variable
getline
2. Preprocessor directive syntax
before
continue
setw
#include <headerfilename>
3. Words that are used for special purposes in a program
return
reserved words
dot (.)
member
4. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
ofstream
scope
initialized
void
5. Symbol that denotes an action to be performed
*
derived class
operator
function prototype
6. Used for function calls and local variables
?
opened
stack
constant variable
7. A file must be ________ before data can be written to or read from it.
rand
data type
opened
overloading
8. Program components in C++ are called functions and ________.
classes
global
return
heap
9. 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.
information hiding
register
strlen()
Stack overflow
10. This is used to mark the end of a complete C++ programming statement.
local variable
Semicolon
case sensitive
classes
11. Used for dynamically allocated variables
::
heap
return
>>
12. 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.
static
getline
cin >> variable
NULL
13. When you create a ___________________in the base class and then call it using an object the function will know to look in the inherited class for the specifics of that function.
Stack overflow
virtual functions
dot (.)
operator
14. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
object file
member
endl (same as 'n')
friend
15. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
searching
/n
operator overloading
semantics
16. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
variables
cmath
char
operator
17. A sequence of operands and operators that describe a calculation to be performed
arithmetic expression
data type
Literals
static
18. 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.
vectors
static
type coercion
inheritance
19. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
source file
semantics
recursive function
globals
20. Header file that contains commonly performed mathematical functions
srand
cmath
arithmetic expression
non-static
21. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
special symbols
static_cast<char>(65)
?
cin >> variable
22. Associate an identifier with a memory location
allocating memory
#include directive
cin >> variable
beginning
23. Syntax for named constant declaration
preprocessor
heap
virtual functions
const datatype identifier = value
24. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
t
function call
Stack overflow
function prototype
25. Message displayed to the screen asking user for input; generated with an output statement
prompt
heap
break
subscript (or index)
26. A pointer is a variable that contains as its value the____________ of another variable.
token
like-type expression
address
default constructor
27. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
object-oriented analysis and design (OOAD)
Stack overflow
?
whitespace
28. Initializers __________ must be used to initialize constant members of a class.
type casting (conversion)
member
global
attributes
29. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
register
template
token
cmath
30. * / % + -
vectors
left
public
Arithmetic Operators
31. You can declare default values for a function in the ____________________.
#include
integer operands
function parameters
member
32. To write data to a file you define an object of which one of the following
beginning
strlen()
inline functions
ofstream
33. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
function call
unary operator
auto
register
34. The stream insertion operator
initialized
<<
preprocessor
data type
35. Sets floating-point values to a fixed decimal format
fixed
recursive
endl (same as 'n')
cin
36. These are data items whose values do not change while the program is running
Literals
void pointer
binary operator
reserve words
37. Class members specified as _________ are accessible anywhere an object of the class is in scope.
polymorphism
delete
public
preprocessor
38. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
static_cast<char>(65)
return
function scope
derived class
39. A human readable file that contains C++ program
cin.get(ch)
source file
data type
preprocessor
40. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
this
type casting (conversion)
a.out
void pointer
41. The symbol for the binary scope resolution operator
::
classes
return
switch
42. Nonexecutable statements that are included in a program to provide information about what the program does etc.
return
comments
left
inline functions
43. Allows the programmer to store a value in a variable
semantics
heap
assignment statement
derived class
44. Every C++ program begins execution at the function _________.
function call
main
setw
&
45. The ________ statement in a called function passes the value of an expression back to the calling function.
return
semantics
identifiers
new line
46. Used to qualify hidden names so that they can be used.
t
vectors
scope resolution operator
% modulus
47. A variable that holds the address of another variable.
global
cmath
pointer
heap
48. data types that refer to numbers with decimals
floating-point
arithmetic expression
global
ofstream
49. The ________ program combines the output of the compiler with various library functions to produce an executable image.
mixed expression
ofstream
linker
selection
50. 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.
showpoint
Sentinel
{ }
scope resolution operator
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