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 pointer is a variable that contains as its value the____________ of another variable.
strcmp()
&
base
address
2. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
public
function prototype
arithmetic expression
scope
3. 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
recursive
Closing brace
base
overloading
4. tab
sorting
unary scope resolution operator (::)
t
public
5. A __________ should be used to declare the size of an array because it makes the program more scalable.
constant variable
named constant
{ }
a.out
6. A function is invoked with a ________.
if
non-static
Unified Modeling Language(UML)
function call
7. C++ programs are normally typed into a computer using a(n) ________ program.
editor
beginning
searching
mixed expression
8. To write data to a file you define an object of which one of the following
local variable
cout
reserve words
ofstream
9. Most calculations are normally performed by ______ statements.
floating-point
assignment
unary scope resolution operator (::)
static
10. Used for function calls and local variables
stack
global
static
function prototype
11. Forces the computer to display decimal point and trailing zeroes
showpoint
assignment statement
void
inheritance
12. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
% modulus
inline functions
operator
base
13. To explicitly indicate that a value is to be converted to another type
type casting (conversion)
information hiding
Sentinel
auto
14. This manipulator is used to establish a field width for the value immediately following it.
reserve words
rand
setw
auto
15. Default name of executable file
strlen()
variable
function call
a.out
16. Syntax for named constant declaration
strcpy()
const datatype identifier = value
access specifier
comments
17. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
subscript (or index)
base class
this
static
18. A sequence of operands and operators that describe a calculation to be performed
function scope
variables
arithmetic expression
access specifier
19. * / % + -
#include <headerfilename>
delete
definition
Arithmetic Operators
20. The sign you use for pointers
fstream
*
before
assignment statement
21. A variable that is known only within the function in which it is defined is called a ________.
overloading
local variable
const
dot (.)
22. Function ________ is used to produce random numbers.
NULL
prompt
object-oriented analysis and design (OOAD)
rand
23. The size & shape & color and weight of an object are considered
return
globals
comments
attributes
24. The process of analyzing and designing a system from an object-oriented point of view is called ________.
getline
special symbols
object-oriented analysis and design (OOAD)
auto
25. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
auto
allocating memory
two-dimensional
function parameters
26. These are data items whose values do not change while the program is running
sorting
base
Literals
int values
27. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
classes
overloading
inline functions
new line
28. Symbol that denotes an action to be performed
cin >> variable
loader
operator
scope resolution operator
29. The modulus operator (%) can be used only with __________.
integer operands
#include directive
base class
non-static
30. Two slash marks ( // ) indicate __________ of a comment
beginning
stack
NULL
const
31. A human readable file that contains C++ program
0
::
function overloading
source file
32. An expression that has operands with different data types
non-static
Sentinel
polymorphism
mixed expression
33. 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.
?
function overloading
Closing brace
friend
34. Lists and tables of values can be stored in arrays or __________.
a.out
vectors
prompt
constant variable
35. The number used to refer to a particular element of an array is called its ________.
<<
#include
subscript (or index)
local variable
36. 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.
void
cin
two-dimensional
operand value
37. Grammar rules of the language; compiler will try to identify and locate syntax errors
syntax
operator
unary operator
case sensitive
38. A function ________ enables a single function to be defined to perform a task on many different data types.
stack
showpoint
Semicolon
template
39. Use 2 characters to represent one
*
escape sequences
#include <headerfilename>
Default memberwise assignment
40. Class members specified as _________ are accessible anywhere an object of the class is in scope.
Sentinel
?
cin >> variable
public
41. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
strcpy()
vectors
function scope
void
42. Member objects are constructed __________ their enclosing class object.
object-oriented analysis and design (OOAD)
before
register
a.out
43. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
private
inline functions
friend
semantics
44. A file must be ________ before data can be written to or read from it.
searching
::
srand
opened
45. A filestream variable that represents the default output device
Literals
new line
classes
cout
46. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
beginning
*
attributes
//
47. Sets floating-point values to a fixed decimal format
classes
function overloading
strcmp()
fixed
48. A variable declared outside any block or function is a ________ variable.
static
&
global
before
49. A program that finds and attaches to your program the indicated libraries for compilation
void pointer
beginning
preprocessor
return
50. The three values that can be used to initialize a pointer are 0 - __________ and an address.
.cpp
Preprocessor
base
NULL