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. Class members specified as _________ are accessible anywhere an object of the class is in scope.
if...else
public
assignment
variable
2. This is used to mark the end of a complete C++ programming statement.
Semicolon
dot (.)
comments
.cpp
3. Returns the length of a string excluding the null terminator.
strlen()
assignment statement
function call
member
4. A memory location with a name and data type - its content may be changed during program execution
variable
static
semantics
this
5. A function is invoked with a ________.
srand
function call
delete
endl (same as 'n')
6. For every opening brace in a C++ program there must be a ______________.
Closing brace
linker
{ }
non-static
7. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
pointer
function scope
scope
*
8. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
comments
special symbols
polymorphism
recursive
9. An expression in which all operands have the same data type - result will have the same data type as operands
like-type expression
binary operator
assignment
operator overloading
10. newline
prompt
if
n
searching
11. A filestream variable that represents the default output device
cout
% modulus
setw
Closing brace
12. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
preprocessor
token
this
loader
13. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
void pointer
two-dimensional
fstream
selection
14. You must have a ___________ for every variable you intend to use in a program
definition
preprocessor
overloading
continue
15. The sign you use for references
Sentinel
semantics
&
setw
16. Names of things that are used in a program - can apply to variables & constants and functions
identifiers
switch
Stack overflow
::
17. 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
base
return
constant variable
function scope
18. If a member initializer is not provided for a member object of a class the object's __________ is called.
attributes
default constructor
function scope
object-oriented analysis and design (OOAD)
19. Syntax for named constant declaration
private
classes
const datatype identifier = value
scope resolution operator
20. The stream extraction operator
Literals
associations
beginning
>>
21. The only integer that can be assigned directly to a pointer is_____________.
0
void
static
stack
22. Used for function calls and local variables
type casting (conversion)
?
register
stack
23. Forces the computer to display decimal point and trailing zeroes
type
type casting (conversion)
case sensitive
showpoint
24. directive A statement that starts with a # is called a ____________.
Preprocessor
function call
function prototype
.cpp
25. Used to qualify hidden names so that they can be used.
function parameters
return
definition
scope resolution operator
26. = & | are examples of ____________.
endl (same as 'n')
preprocessor
special symbols
preprocessor
27. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
private
static
escape sequences
this
28. A function ________ enables a single function to be defined to perform a task on many different data types.
template
named constant
Unified Modeling Language(UML)
continue
29. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
showpoint
register
inline functions
reserved words
30. A __________ should be used to declare the size of an array because it makes the program more scalable.
NULL
Sentinel
constant variable
operator
31. 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.
/n
void
reserve words
prompt
32. All ______ must be declared before they are used.
?
void
variables
Literals
33. The size & shape & color and weight of an object are considered
function call
new line
attributes
scope resolution operator
34. Default name of executable file
strcpy()
&
a.out
::
35. A ________ program executes before the compiler's translation phase begins.
floating-point
polymorphism
preprocessor
t
36. This manipulator causes the field to be left-justified with padding spaces printed to the right.
left
operator overloading
return
variable
37. The address-of operator. it is used to assign pointers and to print the address of variables.
>>
&
template
derived class
38. Keyword public is a(n) _________
int values
token
access specifier
function call
39. Two slash marks ( // ) indicate __________ of a comment
auto
::
Sentinel
beginning
40. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
classes
static
delete
//
41. The process of placing the elements of an array in order is called ________ the array.
cout
syntax
public
sorting
42. 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.
preprocessor
.cpp
inheritance
cin.get(ch)
43. A C++ statement that makes a decision is ______.
variable
if
Unified Modeling Language(UML)
attributes
44. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
integer operands
if...else
*
const
45. Member objects are constructed __________ their enclosing class object.
Unified Modeling Language(UML)
before
static
type coercion
46. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
void
named constant
syntax
ofstream
47. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
access specifier
return
pointer
void
48. A file must be ________ before data can be written to or read from it.
preprocessor
like-type expression
static
opened
49. Type casting syntax
static_cast<char>(65)
strcmp()
overloading
scope resolution operator
50. Lists and tables of values can be stored in arrays or __________.
scope
vectors
constant variable
comments