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. Returns the length of a string excluding the null terminator.
strlen()
register
this
base
2. A type of pointer that can point at objects of any data type.
void pointer
pointer
non-static
{ }
3. Whole numbers - no decimals and no commas included
virtual functions
#include
int values
>>
4. A function that can be used to read character data including whitespace
Literals
cin.get(ch)
reserve words
#include
5. Every C++ statement ends with a(n) _________.
overloading
semicolon
function overloading
strlen()
6. 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.
void
function prototype
object file
syntax
7. Header file that contains commonly performed mathematical functions
private
cmath
public
inheritance
8. A __________ should be used to declare the size of an array because it makes the program more scalable.
type casting (conversion)
template
derived class
constant variable
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.
void
information hiding
a.out
vectors
10. Characters used to separate symbols or reserved words or identifiers and statements
whitespace
address
semicolon
preprocessor
11. data types that refer to numbers with decimals
pointer
if...else
static_cast<char>(65)
floating-point
12. To allow file access in a program you must #include this header file.
member
fstream
Semicolon
void pointer
13. A C++ statement that makes a decision is ______.
strcpy()
//
subscript (or index)
if
14. Type casting syntax
static_cast<char>(65)
showpoint
static
const
15. An operator that can only be used with int values. result will always be an int.
case sensitive
const
% modulus
virtual functions
16. = & | are examples of ____________.
strcmp()
special symbols
function overloading
Literals
17. This manipulator causes the field to be left-justified with padding spaces printed to the right.
left
a.out
inheritance
n
18. The sign you use for pointers
rand
globals
&
*
19. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
register
#include <headerfilename>
operand value
default constructor
20. 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.
strlen()
default constructor
auto
static
21. Member objects are constructed __________ their enclosing class object.
before
like-type expression
::
attributes
22. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
cin.get(ch)
ofstream
scope resolution operator
new line
23. The ________ enables access to a global variable with the same name as a variable in the current scope.
unary scope resolution operator (::)
editor
inline functions
preprocessor
24. Class members specified as _________ are accessible anywhere an object of the class is in scope.
editor
0
public
member
25. A filestream variable that represents the default input source
char
variables
cin
operator overloading
26. Names of things that are used in a program - can apply to variables & constants and functions
left
identifiers
Semicolon
variable
27. The storage-class specifiers are mutable - auto - ________ - extern and static.
register
sorting
return
Unified Modeling Language(UML)
28. A function is invoked with a ________.
function call
.cpp
inline functions
polymorphism
29. All C++ Variables are_________.
type
fixed
case sensitive
left
30. The modulus operator (%) can be used only with __________.
integer operands
fixed
::
base
31. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
operator overloading
void
fstream
return
32. This manipulator is used to establish a field width for the value immediately following it.
strcpy()
a.out
setw
editor
33. In inheritance the ____________ is the class that supplies the inherited members.
default constructor
non-static
base class
strcpy()
34. The elements of an array are related by the fact that they have the same name and ___________.
type
preprocessor
heap
prompt
35. Preprocessor directive syntax
local variable
return
information hiding
#include <headerfilename>
36. Every C++ program begins execution at the function _________.
a.out
identifiers
main
*
37. Most calculations are normally performed by ______ statements.
char
binary operator
assignment
preprocessor
38. A pointer is a variable that contains as its value the____________ of another variable.
address
classes
variable
overloading
39. The conditional operator. it evaluates a line of code and returns one thing if the condition is true and a different thing if the condition is false.
base
?
opened
scope resolution operator
40. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
object-oriented analysis and design (OOAD)
#include
named constant
void
41. Syntax for named constant declaration
scope
Default memberwise assignment
source file
const datatype identifier = value
42. Grammar rules of the language; compiler will try to identify and locate syntax errors
whitespace
default constructor
syntax
ofstream
43. int namespace include using return examples of ___________
comments
cout
.cpp
reserve words
44. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
&
address
cin >> variable
loader
45. Creates a copy of a string.
comments
.cpp
recursive function
strcpy()
46. The ________ program combines the output of the compiler with various library functions to produce an executable image.
preprocessor
Counter-controlled or definite
linker
base
47. Naming convention for C++ programs
.cpp
semantics
arithmetic expression
virtual functions
48. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
.cpp
type coercion
#include
void
49. You must have a ___________ for every variable you intend to use in a program
globals
subscript (or index)
binary operator
definition
50. The stream extraction operator
opened
auto
*
>>
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