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 function that can be used to read character data including whitespace
cin.get(ch)
function parameters
two-dimensional
classes
2. A sequence of operands and operators that describe a calculation to be performed
arithmetic expression
reserved words
/n
identifiers
3. A human readable file that contains C++ program
source file
unary operator
scope resolution operator
local variable
4. To write data to a file you define an object of which one of the following
ofstream
if...else
binary operator
classes
5. Compares two strings and returns 0 if they are equal.
global
this
strcmp()
integer operands
6. Used for function calls and local variables
like-type expression
stack
Closing brace
template
7. Operator with two operands
binary operator
opened
preprocessor
setw
8. Header file that contains commonly performed mathematical functions
Semicolon
const
function scope
cmath
9. In inheritance the ____________ is the class that supplies the inherited members.
void
public
base class
rand
10. Sets floating-point values to a fixed decimal format
fixed
?
object file
heap
11. A ________ program executes before the compiler's translation phase begins.
ofstream
recursive
static_cast<char>(65)
preprocessor
12. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
comments
whitespace
static
semantics
13. A function ________ enables a single function to be defined to perform a task on many different data types.
derived class
#include <headerfilename>
if...else
template
14. newline
n
function overloading
unary scope resolution operator (::)
pointer
15. A variable that is known only within the function in which it is defined is called a ________.
preprocessor
&
strcpy()
local variable
16. The size & shape & color and weight of an object are considered
attributes
unary scope resolution operator (::)
vectors
srand
17. Words that are used for special purposes in a program
static_cast<char>(65)
const datatype identifier = value
reserve words
reserved words
18. 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.
cmath
default constructor
semicolon
virtual functions
19. The modulus operator (%) can be used only with __________.
integer operands
const datatype identifier = value
.cpp
a.out
20. Returns the length of a string excluding the null terminator.
inheritance
&
integer operands
strlen()
21. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
two-dimensional
register
member
inline functions
22. This is used to mark the end of a complete C++ programming statement.
function prototype
recursive
Semicolon
ofstream
23. The process of determining if an array contains a particular key value is called _________ the array.
getline
Closing brace
NULL
searching
24. Forces the computer to display decimal point and trailing zeroes
overloading
showpoint
::
&
25. Identifier or expression that is part of the calculation to be performed
Literals
if...else
operand value
heap
26. Repeating a set of instructions a specific number of times is called_________repetition.
% modulus
strlen()
Counter-controlled or definite
cmath
27. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
const
selection
globals
assignment
28. The _________ begins the body of every function and the _________ ends the body of every function.
cout
{ }
syntax
pointer
29. Symbol that denotes an action to be performed
vectors
semicolon
ofstream
operator
30. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
{ }
named constant
register
#include <headerfilename>
31. Grammar rules of the language; compiler will try to identify and locate syntax errors
reserved words
cin
static
syntax
32. An operator that can only be used with int values. result will always be an int.
% modulus
main
reserve words
fixed
33. The stream extraction operator
>>
searching
pointer
Preprocessor
34. A function that calls itself
Arithmetic Operators
friend
recursive function
&
35. The address-of operator. it is used to assign pointers and to print the address of variables.
&
n
like-type expression
delete
36. 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.
getline
pointer
dot (.)
/n
37. The process of analyzing and designing a system from an object-oriented point of view is called ________.
binary operator
editor
Literals
object-oriented analysis and design (OOAD)
38. A variable declared outside any block or function is a ________ variable.
getline
recursive
global
auto
39. Preprocessor directive syntax
#include <headerfilename>
void
beginning
n
40. Allows the programmer to store a value in a variable
token
recursive function
assignment statement
n
41. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
0
token
selection
main
42. 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.
variable
if
information hiding
named constant
43. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
global
local variable
overloading
access specifier
44. Executable version of program
&
member
object file
t
45. OOD also takes advantage of ________ relationships where new classes of objects are derived by absorbing characteristics of existing classes - then adding unique characteristics of their own.
inheritance
if...else
overloading
virtual functions
46. The ________ program transfers the executable image of a C++ program from disk to memory.
access specifier
loader
escape sequences
assignment statement
47. The stream insertion operator
<<
selection
sorting
left
48. When a value of one data type is implicitly (automatically) changed to another data type
source file
global
searching
type coercion
49. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
char
Arithmetic Operators
endl (same as 'n')
floating-point
50. Classes can have relationships with other classes. These relationships are called ________.
t
floating-point
n
associations