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 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.
endl (same as 'n')
loader
.cpp
?
2. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
getline
&
void
Stack overflow
3. In inheritance the ____________ is the class the receives the inherited members.
0
if...else
initialized
derived class
4. When a value of one data type is implicitly (automatically) changed to another data type
cin.get(ch)
type coercion
allocating memory
template
5. The stream extraction operator
public
>>
Closing brace
continue
6. Message displayed to the screen asking user for input; generated with an output statement
cin >> variable
#include directive
function scope
prompt
7. Type casting syntax
delete
Unified Modeling Language(UML)
friend
static_cast<char>(65)
8. Initializers __________ must be used to initialize constant members of a class.
whitespace
pointer
pointer
member
9. Syntax for named constant declaration
register
const datatype identifier = value
inheritance
function scope
10. __________ can be used to assign an object of a class to another object of the same class.
//
Sentinel
constant variable
Default memberwise assignment
11. All ______ must be declared before they are used.
variables
local variable
delete
endl (same as 'n')
12. A member function should be declared static if it does not access __________ class members.
associations
this
non-static
cin
13. Header file that contains commonly performed mathematical functions
cmath
operator overloading
scope resolution operator
virtual functions
14. Identifier or expression that is part of the calculation to be performed
Preprocessor
operand value
?
integer operands
15. 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.
static_cast<char>(65)
data type
cin >> variable
information hiding
16. A human readable file that contains C++ program
getline
source file
mixed expression
Closing brace
17. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
assignment statement
recursive
pointer
continue
18. Every C++ program begins execution at the function _________.
recursive
identifiers
main
cin >> variable
19. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
Unified Modeling Language(UML)
>>
cin >> variable
classes
20. Associate an identifier with a memory location
continue
variables
<<
allocating memory
21. Two slash marks ( // ) indicate __________ of a comment
0
default constructor
&
beginning
22. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
main
preprocessor
void
new line
23. The __________ operator reclaims memory previously allocated by new.
function call
main
delete
#include
24. = & | are examples of ____________.
void
special symbols
const datatype identifier = value
floating-point
25. The stream insertion operator
type coercion
<<
static
private
26. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
switch
cin
static
register
27. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
integer operands
overloading
Arithmetic Operators
linker
28. Operator with only one operand
Literals
//
operator overloading
unary operator
29. The sign you use for pointers
*
const
static
base class
30. A function that calls itself
object-oriented analysis and design (OOAD)
token
recursive function
void pointer
31. Grammar rules of the language; compiler will try to identify and locate syntax errors
syntax
inheritance
operator overloading
auto
32. The ________ program combines the output of the compiler with various library functions to produce an executable image.
linker
variable
fstream
derived class
33. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
like-type expression
mixed expression
editor
if...else
34. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
strlen()
//
cin >> variable
a.out
35. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
cmath
pointer
Sentinel
char
36. Returns the length of a string excluding the null terminator.
?
semicolon
strlen()
syntax
37. Forces the computer to display decimal point and trailing zeroes
showpoint
recursive
inline functions
&
38. directive A statement that starts with a # is called a ____________.
linker
cin.get(ch)
Preprocessor
return
39. These are data items whose values do not change while the program is running
n
Literals
token
int values
40. The only integer that can be assigned directly to a pointer is_____________.
beginning
getline
#include
0
41. A C++ statement that makes a decision is ______.
allocating memory
delete
if
NULL
42. A program that finds and attaches to your program the indicated libraries for compilation
variables
preprocessor
type coercion
int values
43. Names of things that are used in a program - can apply to variables & constants and functions
identifiers
like-type expression
prompt
cout
44. Used to qualify hidden names so that they can be used.
::
register
opened
scope resolution operator
45. An operator that can only be used with int values. result will always be an int.
initialized
semantics
% modulus
operand value
46. A filestream variable that represents the default output device
non-static
subscript (or index)
assignment statement
cout
47. The size & shape & color and weight of an object are considered
attributes
Semicolon
variable
delete
48. Preprocessor directive syntax
n
pointer
#include <headerfilename>
Unified Modeling Language(UML)
49. The elements of an array are related by the fact that they have the same name and ___________.
inheritance
linker
<<
type
50. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
const
two-dimensional
rand
case sensitive
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