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. For every opening brace in a C++ program there must be a ______________.
int values
before
operator
Closing brace
2. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
function prototype
cmath
member
comments
3. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
void
new line
static
constant variable
4. Default name of executable file
attributes
beginning
a.out
Sentinel
5. Member objects are constructed __________ their enclosing class object.
vectors
preprocessor
0
before
6. Every C++ statement ends with a(n) _________.
semicolon
linker
static
scope
7. 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.
type coercion
void
comments
data type
8. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
ofstream
globals
main
Unified Modeling Language(UML)
9. Message displayed to the screen asking user for input; generated with an output statement
named constant
prompt
operator
this
10. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
operator overloading
Stack overflow
if
function scope
11. A file must be ________ before data can be written to or read from it.
private
/n
opened
member
12. Used for function calls and local variables
template
static
unary scope resolution operator (::)
stack
13. tab
preprocessor
variables
t
cin >> variable
14. The _____ causes the contents of another file to be inserted into a program.
variable
#include directive
information hiding
Literals
15. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
/n
function prototype
void
selection
16. To explicitly indicate that a value is to be converted to another type
?
template
char
type casting (conversion)
17. Allows the programmer to store a value in a variable
const
reserve words
assignment statement
preprocessor
18. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
continue
template
semantics
floating-point
19. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
polymorphism
break
//
recursive function
20. 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.
pointer
local variable
virtual functions
cin
21. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
definition
reserved words
polymorphism
return
22. These are data items whose values do not change while the program is running
const
main
Literals
&
23. The ________ statement in a called function passes the value of an expression back to the calling function.
return
Unified Modeling Language(UML)
two-dimensional
inheritance
24. 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.
beginning
static
access specifier
operator
25. A type of pointer that can point at objects of any data type.
void pointer
inline functions
delete
associations
26. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
char
recursive
fixed
left
27. A __________ should be used to declare the size of an array because it makes the program more scalable.
global
mixed expression
base
constant variable
28. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
syntax
base
Closing brace
operator overloading
29. int namespace include using return examples of ___________
floating-point
register
reserve words
break
30. A constant object must be __________; it cannot be modified after it is created.
assignment
initialized
strlen()
heap
31. The process of placing the elements of an array in order is called ________ the array.
overloading
sorting
#include directive
type casting (conversion)
32. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
static_cast<char>(65)
vectors
cin >> variable
arithmetic expression
33. newline
reserved words
cin.get(ch)
n
Literals
34. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
if...else
const
new line
Counter-controlled or definite
35. An array that uses two subscripts is referred to as a(n) _________ array.
static_cast<char>(65)
two-dimensional
Literals
strcmp()
36. Initializers __________ must be used to initialize constant members of a class.
member
auto
global
return
37. A variable that holds the address of another variable.
arithmetic expression
pointer
editor
address
38. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
data type
searching
recursive
allocating memory
39. The number used to refer to a particular element of an array is called its ________.
void pointer
member
template
subscript (or index)
40. The storage-class specifiers are mutable - auto - ________ - extern and static.
//
base
register
searching
41. A function that calls itself
recursive function
object-oriented analysis and design (OOAD)
static_cast<char>(65)
strcpy()
42. Forces the computer to display decimal point and trailing zeroes
showpoint
t
syntax
beginning
43. 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.
/n
const
member
//
44. A function that can be used to read character data including whitespace
% modulus
cin.get(ch)
<<
associations
45. An operator that can only be used with int values. result will always be an int.
const
arithmetic expression
% modulus
allocating memory
46. Type casting syntax
integer operands
overloading
srand
static_cast<char>(65)
47. Two slash marks ( // ) indicate __________ of a comment
cin >> variable
auto
const datatype identifier = value
beginning
48. Classes can have relationships with other classes. These relationships are called ________.
associations
function prototype
pointer
t
49. 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.
searching
stack
information hiding
char
50. This is used to mark the end of a complete C++ programming statement.
Semicolon
type
inline functions
if...else
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