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. 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
preprocessor
integer operands
strcmp()
base
2. Type casting syntax
function prototype
static_cast<char>(65)
srand
friend
3. 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
function call
stack
endl (same as 'n')
4. For every opening brace in a C++ program there must be a ______________.
constant variable
Closing brace
assignment
sorting
5. Symbol that denotes an action to be performed
opened
source file
floating-point
operator
6. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
#include <headerfilename>
#include directive
initialized
void
7. Operator with two operands
derived class
variable
named constant
binary operator
8. 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.
template
void
#include
fixed
9. All ______ must be declared before they are used.
const
arithmetic expression
template
variables
10. Default name of executable file
Preprocessor
a.out
integer operands
new line
11. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
overloading
void
semicolon
inheritance
12. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
auto
#include
base
<<
13. A file must be ________ before data can be written to or read from it.
syntax
opened
t
classes
14. = & | are examples of ____________.
special symbols
const
source file
escape sequences
15. 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.
scope resolution operator
heap
Sentinel
Unified Modeling Language(UML)
16. Initializers __________ must be used to initialize constant members of a class.
::
NULL
member
#include <headerfilename>
17. The ________ qualifier is used to declare read-only variables.
semicolon
const
preprocessor
cin >> variable
18. newline
n
whitespace
dot (.)
return
19. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
template
/n
function scope
private
20. A human readable file that contains C++ program
return
source file
srand
register
21. This manipulator is used to establish a field width for the value immediately following it.
Semicolon
static
ofstream
setw
22. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
template
cmath
a.out
function prototype
23. If a member initializer is not provided for a member object of a class the object's __________ is called.
preprocessor
break
default constructor
void pointer
24. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
fixed
srand
globals
mixed expression
25. You can declare default values for a function in the ____________________.
showpoint
operator overloading
function parameters
whitespace
26. Program components in C++ are called functions and ________.
whitespace
private
attributes
classes
27. Nonexecutable statements that are included in a program to provide information about what the program does etc.
object-oriented analysis and design (OOAD)
recursive function
comments
switch
28. * / % + -
unary scope resolution operator (::)
selection
object-oriented analysis and design (OOAD)
Arithmetic Operators
29. The only integer that can be assigned directly to a pointer is_____________.
two-dimensional
0
scope resolution operator
comments
30. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
sorting
function parameters
new line
unary scope resolution operator (::)
31. Every C++ program begins execution at the function _________.
main
Closing brace
% modulus
member
32. The process of analyzing and designing a system from an object-oriented point of view is called ________.
access specifier
operand value
two-dimensional
object-oriented analysis and design (OOAD)
33. A function ________ enables a single function to be defined to perform a task on many different data types.
Sentinel
template
two-dimensional
syntax
34. 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.
showpoint
two-dimensional
?
Default memberwise assignment
35. Every C++ statement ends with a(n) _________.
assignment
cin
floating-point
semicolon
36. Use 2 characters to represent one
two-dimensional
escape sequences
cmath
cin >> variable
37. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
type coercion
local variable
case sensitive
recursive
38. C++ programs are normally typed into a computer using a(n) ________ program.
if...else
selection
editor
preprocessor
39. A set of values together with a set of operations
scope
*
if
data type
40. All C++ Variables are_________.
recursive function
case sensitive
identifiers
sorting
41. The ________ program transfers the executable image of a C++ program from disk to memory.
like-type expression
operand value
loader
integer operands
42. Class members are accessed via the ________ operator in conjunction with the name of an object (or reference to an object) of the class or via the arrow (->) operator in conjunction with a pointer to an object of the class.
variable
if...else
dot (.)
preprocessor
43. Names of things that are used in a program - can apply to variables & constants and functions
information hiding
#include
identifiers
fixed
44. The ________ of an identifier is the portion of the program in which the identifier can be used.
non-static
register
scope
base
45. Message displayed to the screen asking user for input; generated with an output statement
type coercion
semantics
friend
prompt
46. The modulus operator (%) can be used only with __________.
mixed expression
integer operands
auto
syntax
47. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
named constant
rand
break
two-dimensional
48. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
Closing brace
reserve words
function parameters
//
49. The ________ statement in a called function passes the value of an expression back to the calling function.
>>
return
access specifier
cin
50. 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.
Preprocessor
virtual functions
whitespace
type coercion