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. The storage-class specifiers are mutable - auto - ________ - extern and static.
reserve words
unary scope resolution operator (::)
register
named constant
2. 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.
rand
access specifier
virtual functions
*
3. A filestream variable that represents the default input source
cin
opened
two-dimensional
allocating memory
4. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
semantics
main
void
overloading
5. The size & shape & color and weight of an object are considered
attributes
whitespace
object-oriented analysis and design (OOAD)
preprocessor
6. A member function should be declared static if it does not access __________ class members.
binary operator
whitespace
non-static
pointer
7. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
recursive function
strcpy()
inline functions
derived class
8. The _____ causes the contents of another file to be inserted into a program.
#include directive
this
special symbols
function prototype
9. The ________ enables access to a global variable with the same name as a variable in the current scope.
unary scope resolution operator (::)
pointer
operand value
assignment statement
10. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
#include
break
scope resolution operator
binary operator
11. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
private
reserve words
static_cast<char>(65)
t
12. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
opened
pointer
named constant
beginning
13. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
<<
classes
scope resolution operator
Sentinel
14. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
static_cast<char>(65)
Preprocessor
Stack overflow
allocating memory
15. Used for function calls and local variables
preprocessor
stack
subscript (or index)
whitespace
16. The address-of operator. it is used to assign pointers and to print the address of variables.
delete
&
strlen()
left
17. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
information hiding
getline
register
srand
18. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
void
function prototype
associations
switch
19. Every C++ program begins execution at the function _________.
int values
main
associations
cin
20. Two slash marks ( // ) indicate __________ of a comment
beginning
cin >> variable
variable
continue
21. A function that calls itself
special symbols
recursive function
const
new line
22. If a member initializer is not provided for a member object of a class the object's __________ is called.
named constant
return
strlen()
default constructor
23. A function ________ enables a single function to be defined to perform a task on many different data types.
switch
classes
function scope
template
24. The process of analyzing and designing a system from an object-oriented point of view is called ________.
mixed expression
beginning
object-oriented analysis and design (OOAD)
auto
25. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
assignment statement
type casting (conversion)
inline functions
if...else
26. A variable that is known only within the function in which it is defined is called a ________.
?
local variable
/n
break
27. C++ programs are normally typed into a computer using a(n) ________ program.
polymorphism
editor
arithmetic expression
main
28. 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
Semicolon
Default memberwise assignment
base
virtual functions
29. The sign you use for references
member
function overloading
&
*
30. * / % + -
Arithmetic Operators
return
escape sequences
auto
31. 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.
left
Arithmetic Operators
n
Sentinel
32. An expression that has operands with different data types
continue
Semicolon
mixed expression
sorting
33. The symbol for the binary scope resolution operator
classes
::
int values
information hiding
34. Message displayed to the screen asking user for input; generated with an output statement
cin.get(ch)
prompt
::
showpoint
35. To allow file access in a program you must #include this header file.
inline functions
fstream
variable
attributes
36. An array that uses two subscripts is referred to as a(n) _________ array.
two-dimensional
function call
global
polymorphism
37. For a local variable in a function to retain its value between calls to the function it must be declared with the ________ storage-class specifier.
recursive function
operator overloading
strcmp()
static
38. A set of values together with a set of operations
floating-point
data type
{ }
reserve words
39. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
function scope
opened
this
derived class
40. Words that are used for special purposes in a program
reserved words
pointer
strlen()
preprocessor
41. Keyword public is a(n) _________
const
const datatype identifier = value
this
access specifier
42. The ________ program combines the output of the compiler with various library functions to produce an executable image.
derived class
linker
main
special symbols
43. The idea that you can call the same function and the output will depend on the type of object you're using.
inheritance
dot (.)
polymorphism
auto
44. Preprocessor directive syntax
recursive
floating-point
&
#include <headerfilename>
45. A __________ should be used to declare the size of an array because it makes the program more scalable.
function overloading
constant variable
#include directive
public
46. When a value of one data type is implicitly (automatically) changed to another data type
type coercion
two-dimensional
like-type expression
cin.get(ch)
47. Most calculations are normally performed by ______ statements.
object file
whitespace
opened
assignment
48. tab
char
heap
t
function call
49. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
fstream
before
function scope
mixed expression
50. A variable declared outside any block or function is a ________ variable.
global
preprocessor
static_cast<char>(65)
initialized