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. 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.
/n
{ }
base class
information hiding
2. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
integer operands
return
//
break
3. Used to qualify hidden names so that they can be used.
Literals
function prototype
if
scope resolution operator
4. Member objects are constructed __________ their enclosing class object.
initialized
stack
before
variable
5. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
char
if
selection
void
6. Class members specified as _________ are accessible anywhere an object of the class is in scope.
information hiding
public
srand
#include
7. Type casting syntax
recursive
escape sequences
static_cast<char>(65)
assignment
8. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
preprocessor
friend
local variable
Sentinel
9. tab
t
operator overloading
reserve words
whitespace
10. 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
inline functions
static
static_cast<char>(65)
11. The sign you use for references
setw
&
syntax
vectors
12. The modulus operator (%) can be used only with __________.
friend
integer operands
base
operator overloading
13. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
function prototype
Semicolon
Stack overflow
Literals
14. The __________ operator reclaims memory previously allocated by new.
delete
loader
preprocessor
a.out
15. Used for function calls and local variables
stack
t
heap
operator
16. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
Semicolon
//
unary operator
if...else
17. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
selection
assignment statement
function scope
semantics
18. The stream insertion operator
<<
comments
&
constant variable
19. This manipulator is used to establish a field width for the value immediately following it.
getline
setw
n
function prototype
20. A C++ statement that makes a decision is ______.
named constant
cin.get(ch)
if
syntax
21. A program that finds and attaches to your program the indicated libraries for compilation
preprocessor
sorting
const datatype identifier = value
//
22. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
address
#include
derived class
Stack overflow
23. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
dot (.)
const
NULL
n
24. In inheritance the ____________ is the class the receives the inherited members.
overloading
searching
derived class
inheritance
25. To explicitly indicate that a value is to be converted to another type
reserved words
inline functions
type casting (conversion)
#include <headerfilename>
26. Sets floating-point values to a fixed decimal format
fixed
syntax
non-static
if...else
27. In inheritance the ____________ is the class that supplies the inherited members.
auto
reserve words
base class
unary operator
28. Forces the computer to display decimal point and trailing zeroes
global
Sentinel
#include directive
showpoint
29. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
<<
base
globals
Closing brace
30. The _____ causes the contents of another file to be inserted into a program.
like-type expression
stack
#include directive
endl (same as 'n')
31. data types that refer to numbers with decimals
floating-point
#include <headerfilename>
function prototype
if
32. Repeating a set of instructions a specific number of times is called_________repetition.
template
selection
?
Counter-controlled or definite
33. Characters used to separate symbols or reserved words or identifiers and statements
reserved words
semantics
whitespace
unary scope resolution operator (::)
34. To allow file access in a program you must #include this header file.
stack
return
prompt
fstream
35. A function that calls itself
operator
local variable
pointer
recursive function
36. Most calculations are normally performed by ______ statements.
operator overloading
&
assignment
register
37. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
.cpp
getline
pointer
inheritance
38. The idea that you can call the same function and the output will depend on the type of object you're using.
function prototype
return
before
polymorphism
39. A function is invoked with a ________.
::
function call
opened
integer operands
40. = & | are examples of ____________.
mixed expression
break
special symbols
scope resolution operator
41. A variable that is known only within the function in which it is defined is called a ________.
strcmp()
local variable
mixed expression
delete
42. The sign you use for pointers
local variable
*
editor
/n
43. A __________ data member represents class-wide information.
strcpy()
void
ofstream
static
44. An expression in which all operands have the same data type - result will have the same data type as operands
?
like-type expression
fstream
assignment statement
45. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
function scope
integer operands
private
initialized
46. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
Semicolon
syntax
function overloading
recursive function
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.
if
inline functions
break
identifiers
48. 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
virtual functions
<<
left
49. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
auto
function parameters
default constructor
loader
50. A memory location with a name and data type - its content may be changed during program execution
variable
Sentinel
function parameters
inheritance