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. newline
stack
n
semicolon
Counter-controlled or definite
2. When a value of one data type is implicitly (automatically) changed to another data type
type coercion
template
/n
left
3. tab
ofstream
static
pointer
t
4. The ________ statement in a called function passes the value of an expression back to the calling function.
data type
return
local variable
strcpy()
5. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
NULL
type
access specifier
if...else
6. A __________ should be used to declare the size of an array because it makes the program more scalable.
constant variable
cmath
integer operands
fixed
7. A ________ program executes before the compiler's translation phase begins.
inline functions
Unified Modeling Language(UML)
cin >> variable
preprocessor
8. 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.
recursive
fstream
semicolon
?
9. data types that refer to numbers with decimals
Preprocessor
?
floating-point
vectors
10. A function is invoked with a ________.
function call
local variable
preprocessor
assignment statement
11. Repeating a set of instructions a specific number of times is called_________repetition.
case sensitive
Counter-controlled or definite
attributes
binary operator
12. Most calculations are normally performed by ______ statements.
Arithmetic Operators
left
const
assignment
13. The symbol for the binary scope resolution operator
recursive
void
::
continue
14. A type of pointer that can point at objects of any data type.
assignment statement
unary operator
void pointer
pointer
15. Sets floating-point values to a fixed decimal format
>>
NULL
fixed
non-static
16. To allow file access in a program you must #include this header file.
Sentinel
fstream
initialized
recursive function
17. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
inline functions
main
vectors
Counter-controlled or definite
18. int namespace include using return examples of ___________
function scope
reserve words
recursive
setw
19. Symbol that denotes an action to be performed
inheritance
const datatype identifier = value
operator
getline
20. Grammar rules of the language; compiler will try to identify and locate syntax errors
unary scope resolution operator (::)
&
syntax
endl (same as 'n')
21. Causes the program to immediately goes back to the top of the loop. the remainder of the statements in the loop are ignored for this current iteration.
definition
attributes
default constructor
continue
22. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
const
.cpp
#include
Preprocessor
23. In inheritance the ____________ is the class that supplies the inherited members.
comments
loader
selection
base class
24. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
access specifier
this
#include
base
25. Creates a copy of a string.
static
opened
strcpy()
switch
26. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
static
semicolon
type casting (conversion)
operator overloading
27. A pointer is a variable that contains as its value the____________ of another variable.
linker
address
initialized
selection
28. * / % + -
strcpy()
Arithmetic Operators
whitespace
Closing brace
29. The stream extraction operator
integer operands
scope resolution operator
recursive function
>>
30. The storage-class specifiers are mutable - auto - ________ - extern and static.
register
initialized
recursive function
global
31. A function that can be used to read character data including whitespace
cin.get(ch)
classes
void pointer
function overloading
32. In inheritance the ____________ is the class the receives the inherited members.
unary operator
derived class
fixed
base
33. Used for function calls and local variables
base
stack
semicolon
delete
34. A function that calls itself
floating-point
integer operands
type coercion
recursive function
35. Naming convention for C++ programs
editor
object-oriented analysis and design (OOAD)
char
.cpp
36. This is used to mark the end of a complete C++ programming statement.
int values
two-dimensional
const datatype identifier = value
Semicolon
37. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
const
register
return
break
38. Keyword public is a(n) _________
&
Sentinel
&
access specifier
39. When it is not known in advance how many times a set of statements will be repeated a _________value can be used to terminate the repetition.
allocating memory
Sentinel
Literals
reserve words
40. Characters used to separate symbols or reserved words or identifiers and statements
whitespace
#include directive
Literals
recursive
41. You can declare default values for a function in the ____________________.
function parameters
searching
public
initialized
42. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
static_cast<char>(65)
recursive function
char
Sentinel
43. These are data items whose values do not change while the program is running
const
object-oriented analysis and design (OOAD)
Literals
int values
44. A variable declared outside any block or function is a ________ variable.
classes
setw
showpoint
global
45. A human readable file that contains C++ program
static
source file
prompt
before
46. A file must be ________ before data can be written to or read from it.
opened
const
type coercion
void
47. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
//
attributes
Arithmetic Operators
register
48. The process of placing the elements of an array in order is called ________ the array.
token
sorting
information hiding
inline functions
49. An expression in which all operands have the same data type - result will have the same data type as operands
recursive
like-type expression
polymorphism
% modulus
50. The process of determining if an array contains a particular key value is called _________ the array.
ofstream
searching
information hiding
derived class