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_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
a.out
semicolon
if...else
Preprocessor
2. Use 2 characters to represent one
static
Literals
mixed expression
escape sequences
3. Used for function calls and local variables
token
public
a.out
stack
4. An expression that has operands with different data types
mixed expression
strcpy()
comments
static
5. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
?
recursive
unary scope resolution operator (::)
rand
6. Classes can have relationships with other classes. These relationships are called ________.
associations
rand
delete
classes
7. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
definition
auto
named constant
object file
8. The idea that you can call the same function and the output will depend on the type of object you're using.
polymorphism
return
this
getline
9. The escape sequence ___ when output with cout and the stream insertion operator - causes the cursor to position to the beginning of the next line on the screen.
selection
floating-point
setw
/n
10. To write data to a file you define an object of which one of the following
getline
scope resolution operator
attributes
ofstream
11. The _____ causes the contents of another file to be inserted into a program.
#include directive
Sentinel
selection
semantics
12. These are data items whose values do not change while the program is running
function overloading
searching
inheritance
Literals
13. The storage-class specifiers are mutable - auto - ________ - extern and static.
comments
.cpp
register
member
14. __________ can be used to assign an object of a class to another object of the same class.
vectors
0
prompt
Default memberwise assignment
15. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
unary scope resolution operator (::)
assignment statement
//
return
16. Operator with only one operand
virtual functions
getline
<<
unary operator
17. Returns the length of a string excluding the null terminator.
Counter-controlled or definite
private
strlen()
stack
18. If a member initializer is not provided for a member object of a class the object's __________ is called.
assignment statement
variables
default constructor
special symbols
19. The only integer that can be assigned directly to a pointer is_____________.
this
0
n
allocating memory
20. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
mixed expression
loader
pointer
static_cast<char>(65)
21. Repeating a set of instructions a specific number of times is called_________repetition.
const
Counter-controlled or definite
return
polymorphism
22. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
variable
register
fstream
function prototype
23. Preprocessor directive syntax
#include <headerfilename>
if...else
inline functions
>>
24. The ________ program transfers the executable image of a C++ program from disk to memory.
named constant
ofstream
token
loader
25. Every C++ program begins execution at the function _________.
&
main
template
comments
26. Used for dynamically allocated variables
prompt
heap
type casting (conversion)
function scope
27. A program that finds and attaches to your program the indicated libraries for compilation
global
#include
preprocessor
type casting (conversion)
28. When a value of one data type is implicitly (automatically) changed to another data type
function call
type coercion
pointer
#include
29. directive A statement that starts with a # is called a ____________.
Preprocessor
a.out
n
Stack overflow
30. The size & shape & color and weight of an object are considered
prompt
attributes
void
strlen()
31. Compares two strings and returns 0 if they are equal.
inheritance
if
classes
strcmp()
32. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
integer operands
int values
cin >> variable
special symbols
33. A pointer is a variable that contains as its value the____________ of another variable.
char
n
return
address
34. The ________ qualifier is used to declare read-only variables.
return
const
a.out
selection
35. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
if
type
this
searching
36. A constant object must be __________; it cannot be modified after it is created.
classes
::
initialized
register
37. The process of placing the elements of an array in order is called ________ the array.
strcpy()
like-type expression
sorting
a.out
38. A function is invoked with a ________.
return
register
stack
function call
39. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
&
token
>>
syntax
40. A __________ should be used to declare the size of an array because it makes the program more scalable.
constant variable
Stack overflow
reserved words
globals
41. Default name of executable file
comments
static_cast<char>(65)
data type
a.out
42. A variable declared outside any block or function is a ________ variable.
token
global
//
heap
43. Sets floating-point values to a fixed decimal format
access specifier
function call
fixed
prompt
44. A ________ program executes before the compiler's translation phase begins.
semantics
type coercion
Stack overflow
preprocessor
45. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
function overloading
Sentinel
t
variable
46. A set of values together with a set of operations
default constructor
<<
data type
&
47. A filestream variable that represents the default output device
unary operator
cout
static_cast<char>(65)
fixed
48. The _________ begins the body of every function and the _________ ends the body of every function.
0
named constant
{ }
/n
49. A file must be ________ before data can be written to or read from it.
0
opened
object file
function overloading
50. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
function scope
Closing brace
reserved words
reserve words
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