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. Naming convention for C++ programs
.cpp
named constant
cin
classes
2. A function ________ enables a single function to be defined to perform a task on many different data types.
editor
template
variables
getline
3. Initializers __________ must be used to initialize constant members of a class.
member
ofstream
Semicolon
special symbols
4. The idea that you can call the same function and the output will depend on the type of object you're using.
polymorphism
NULL
main
Default memberwise assignment
5. Executable version of program
object file
const
arithmetic expression
before
6. The number used to refer to a particular element of an array is called its ________.
register
break
sorting
subscript (or index)
7. A function is invoked with a ________.
default constructor
function call
const
non-static
8. A variable that holds the address of another variable.
type coercion
recursive
char
pointer
9. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
inline functions
a.out
{ }
derived class
10. Used to qualify hidden names so that they can be used.
scope resolution operator
reserve words
member
heap
11. Symbol that denotes an action to be performed
before
void
function parameters
operator
12. Words that are used for special purposes in a program
&
searching
reserved words
selection
13. Every C++ program begins execution at the function _________.
Default memberwise assignment
pointer
cmath
main
14. A recursive function typically has two components: One that provides a means for the recursion to terminate by testing for a(n) ________ case and one that expresses the problem as a recursive call for a slightly simpler problem than the original call
reserve words
strcmp()
setw
base
15. An expression in which all operands have the same data type - result will have the same data type as operands
floating-point
endl (same as 'n')
before
like-type expression
16. C++ programs are normally typed into a computer using a(n) ________ program.
cmath
whitespace
editor
heap
17. You must have a ___________ for every variable you intend to use in a program
two-dimensional
vectors
definition
strcpy()
18. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
token
getline
% modulus
return
19. To explicitly indicate that a value is to be converted to another type
type casting (conversion)
overloading
void
register
20. __________ can be used to assign an object of a class to another object of the same class.
local variable
const
Default memberwise assignment
getline
21. The process of placing the elements of an array in order is called ________ the array.
void pointer
inline functions
cmath
sorting
22. Header file that contains commonly performed mathematical functions
case sensitive
cmath
assignment
cout
23. A member function should be declared static if it does not access __________ class members.
non-static
private
scope resolution operator
register
24. A type of pointer that can point at objects of any data type.
auto
recursive function
void pointer
virtual functions
25. Associate an identifier with a memory location
allocating memory
cin.get(ch)
address
register
26. 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.
address
Stack overflow
virtual functions
static_cast<char>(65)
27. Every C++ statement ends with a(n) _________.
token
semicolon
operator overloading
linker
28. 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.
default constructor
fixed
/n
floating-point
29. 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.
cin.get(ch)
?
reserve words
two-dimensional
30. Names of things that are used in a program - can apply to variables & constants and functions
identifiers
Unified Modeling Language(UML)
loader
pointer
31. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
pointer
main
special symbols
Literals
32. Operator with only one operand
prompt
unary operator
like-type expression
object file
33. A file must be ________ before data can be written to or read from it.
register
type casting (conversion)
opened
this
34. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
new line
this
strcpy()
0
35. Sets floating-point values to a fixed decimal format
virtual functions
fixed
left
function overloading
36. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
strlen()
semantics
fstream
comments
37. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
static_cast<char>(65)
data type
type casting (conversion)
function overloading
38. In inheritance the ____________ is the class that supplies the inherited members.
virtual functions
base class
function parameters
showpoint
39. To allow file access in a program you must #include this header file.
fstream
source file
const
cout
40. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
sorting
globals
virtual functions
Literals
41. A variable declared outside any block or function is a ________ variable.
return
global
Preprocessor
register
42. 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
beginning
Unified Modeling Language(UML)
int values
43. Keyword public is a(n) _________
left
access specifier
n
return
44. A pointer is a variable that contains as its value the____________ of another variable.
address
void pointer
if
like-type expression
45. All ______ must be declared before they are used.
fstream
#include
variables
cin >> variable
46. This is used to mark the end of a complete C++ programming statement.
Semicolon
information hiding
% modulus
strcmp()
47. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
assignment
char
<<
type
48. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
data type
void
<<
reserve words
49. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
local variable
switch
friend
classes
50. Identifier or expression that is part of the calculation to be performed
0
special symbols
return
operand value