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. Use 2 characters to represent one
subscript (or index)
Closing brace
overloading
escape sequences
2. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
binary operator
#include
auto
globals
3. Used to qualify hidden names so that they can be used.
scope resolution operator
operator
Semicolon
cin
4. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
cin >> variable
Literals
public
if
5. Returns the length of a string excluding the null terminator.
strlen()
cout
assignment
special symbols
6. A C++ statement that makes a decision is ______.
if
preprocessor
binary operator
member
7. A set of values together with a set of operations
semicolon
void
unary operator
data type
8. The stream insertion operator
Arithmetic Operators
<<
*
#include <headerfilename>
9. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
globals
recursive
dot (.)
>>
10. A constant object must be __________; it cannot be modified after it is created.
polymorphism
type casting (conversion)
% modulus
initialized
11. A function ________ enables a single function to be defined to perform a task on many different data types.
Stack overflow
type casting (conversion)
template
initialized
12. newline
friend
n
NULL
object-oriented analysis and design (OOAD)
13. Symbol that denotes an action to be performed
recursive
case sensitive
linker
operator
14. The ________ program combines the output of the compiler with various library functions to produce an executable image.
whitespace
linker
non-static
switch
15. Associate an identifier with a memory location
allocating memory
#include
classes
binary operator
16. The ________ enables access to a global variable with the same name as a variable in the current scope.
mixed expression
whitespace
unary scope resolution operator (::)
binary operator
17. 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.
preprocessor
address
void
operator overloading
18. For every opening brace in a C++ program there must be a ______________.
switch
special symbols
unary scope resolution operator (::)
Closing brace
19. A human readable file that contains C++ program
source file
Unified Modeling Language(UML)
function parameters
% modulus
20. Operator with two operands
beginning
continue
binary operator
t
21. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
void
variables
pointer
special symbols
22. In inheritance the ____________ is the class the receives the inherited members.
derived class
static_cast<char>(65)
% modulus
preprocessor
23. C++ programs are normally typed into a computer using a(n) ________ program.
unary scope resolution operator (::)
auto
int values
editor
24. The three values that can be used to initialize a pointer are 0 - __________ and an address.
named constant
NULL
assignment statement
recursive
25. In inheritance the ____________ is the class that supplies the inherited members.
binary operator
before
base class
type
26. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
heap
default constructor
case sensitive
getline
27. The idea that you can call the same function and the output will depend on the type of object you're using.
.cpp
comments
const
polymorphism
28. 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.
Semicolon
n
static
<<
29. Keyword public is a(n) _________
Preprocessor
access specifier
inheritance
object file
30. Program components in C++ are called functions and ________.
arithmetic expression
classes
sorting
editor
31. The elements of an array are related by the fact that they have the same name and ___________.
this
type
{ }
const datatype identifier = value
32. Nonexecutable statements that are included in a program to provide information about what the program does etc.
comments
case sensitive
void
reserved words
33. An expression that has operands with different data types
mixed expression
register
editor
before
34. The process of placing the elements of an array in order is called ________ the array.
recursive
sorting
void
continue
35. A __________ should be used to declare the size of an array because it makes the program more scalable.
variables
linker
Sentinel
constant variable
36. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
operator overloading
type
/n
editor
37. Grammar rules of the language; compiler will try to identify and locate syntax errors
return
Arithmetic Operators
syntax
preprocessor
38. Type casting syntax
.cpp
static_cast<char>(65)
function parameters
fstream
39. Operator with only one operand
void pointer
named constant
static
unary operator
40. Classes can have relationships with other classes. These relationships are called ________.
type coercion
associations
&
Default memberwise assignment
41. Class members specified as _________ are accessible anywhere an object of the class is in scope.
subscript (or index)
heap
escape sequences
public
42. The modulus operator (%) can be used only with __________.
integer operands
type casting (conversion)
arithmetic expression
n
43. Words that are used for special purposes in a program
mixed expression
friend
a.out
reserved words
44. The __________ operator reclaims memory previously allocated by new.
variables
delete
searching
cin.get(ch)
45. The size & shape & color and weight of an object are considered
stack
attributes
definition
dot (.)
46. The ________ program transfers the executable image of a C++ program from disk to memory.
loader
strcpy()
pointer
continue
47. This is used to mark the end of a complete C++ programming statement.
subscript (or index)
initialized
Semicolon
operator overloading
48. 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.
getline
information hiding
&
strlen()
49. To allow file access in a program you must #include this header file.
type
fstream
variables
cin.get(ch)
50. The _________ begins the body of every function and the _________ ends the body of every function.
{ }
main
fixed
return
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