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 address-of operator. it is used to assign pointers and to print the address of variables.
operand value
void
type
&
2. The _________ begins the body of every function and the _________ ends the body of every function.
allocating memory
{ }
information hiding
delete
3. A human readable file that contains C++ program
static
reserve words
source file
beginning
4. A file must be ________ before data can be written to or read from it.
type
opened
Unified Modeling Language(UML)
Sentinel
5. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
cin >> variable
static_cast<char>(65)
if
dot (.)
6. Every C++ program begins execution at the function _________.
function parameters
main
{ }
associations
7. Program components in C++ are called functions and ________.
srand
member
classes
prompt
8. A variable that is known only within the function in which it is defined is called a ________.
t
object-oriented analysis and design (OOAD)
local variable
this
9. data types that refer to numbers with decimals
floating-point
operator
definition
return
10. A __________ data member represents class-wide information.
function call
public
static
dot (.)
11. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
operand value
default constructor
identifiers
friend
12. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
heap
?
base class
switch
13. Use 2 characters to represent one
{ }
escape sequences
if
n
14. A member function should be declared static if it does not access __________ class members.
non-static
scope resolution operator
subscript (or index)
member
15. Naming convention for C++ programs
recursive function
.cpp
getline
&
16. An operator that can only be used with int values. result will always be an int.
information hiding
Closing brace
% modulus
unary operator
17. The process of determining if an array contains a particular key value is called _________ the array.
::
static_cast<char>(65)
searching
*
18. 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.
derived class
information hiding
NULL
special symbols
19. An expression in which all operands have the same data type - result will have the same data type as operands
subscript (or index)
cout
sorting
like-type expression
20. The _____ causes the contents of another file to be inserted into a program.
void
#include directive
scope
strcmp()
21. * / % + -
Arithmetic Operators
inline functions
opened
variable
22. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
semantics
if...else
member
globals
23. Compares two strings and returns 0 if they are equal.
classes
function call
strcmp()
base class
24. Operator with only one operand
reserve words
unary operator
scope resolution operator
cmath
25. 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.
selection
Stack overflow
dot (.)
const
26. 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
?
base
showpoint
like-type expression
27. Grammar rules of the language; compiler will try to identify and locate syntax errors
Arithmetic Operators
break
left
syntax
28. 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.
sorting
virtual functions
Semicolon
Default memberwise assignment
29. In inheritance the ____________ is the class the receives the inherited members.
derived class
function call
recursive function
two-dimensional
30. For every opening brace in a C++ program there must be a ______________.
Closing brace
if
inline functions
beginning
31. An expression that has operands with different data types
operator
this
function parameters
mixed expression
32. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
stack
inline functions
Unified Modeling Language(UML)
semantics
33. To write data to a file you define an object of which one of the following
switch
ofstream
variables
before
34. Associate an identifier with a memory location
/n
allocating memory
assignment
preprocessor
35. The symbol for the binary scope resolution operator
::
heap
assignment
cin
36. Forces the computer to display decimal point and trailing zeroes
private
source file
showpoint
unary operator
37. The process of analyzing and designing a system from an object-oriented point of view is called ________.
escape sequences
object-oriented analysis and design (OOAD)
Arithmetic Operators
semicolon
38. All ______ must be declared before they are used.
assignment
const
const
variables
39. A function ________ enables a single function to be defined to perform a task on many different data types.
Closing brace
global
template
overloading
40. newline
static_cast<char>(65)
n
Preprocessor
return
41. Keyword public is a(n) _________
/n
access specifier
static_cast<char>(65)
data type
42. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
Arithmetic Operators
left
void
type casting (conversion)
43. The process of placing the elements of an array in order is called ________ the array.
getline
sorting
Semicolon
whitespace
44. Type casting syntax
like-type expression
{ }
static_cast<char>(65)
continue
45. Most calculations are normally performed by ______ statements.
scope
assignment
prompt
variables
46. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
#include <headerfilename>
classes
operator overloading
inline functions
47. A filestream variable that represents the default output device
cin >> variable
classes
cout
assignment statement
48. The storage-class specifiers are mutable - auto - ________ - extern and static.
private
arithmetic expression
register
address
49. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
operator overloading
a.out
% modulus
base class
50. Sets floating-point values to a fixed decimal format
function overloading
binary operator
return
fixed
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