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.
::
if
address
variables
2. Preprocessor directive syntax
#include <headerfilename>
classes
getline
data type
3. This manipulator causes the field to be left-justified with padding spaces printed to the right.
left
stack
strcmp()
Preprocessor
4. This manipulator is used to establish a field width for the value immediately following it.
sorting
assignment
setw
char
5. A memory location with a name and data type - its content may be changed during program execution
recursive
variable
function prototype
pointer
6. Syntax for named constant declaration
getline
setw
break
const datatype identifier = value
7. A filestream variable that represents the default output device
cout
main
void
getline
8. The stream insertion operator
vectors
cin.get(ch)
searching
<<
9. Nonexecutable statements that are included in a program to provide information about what the program does etc.
register
type casting (conversion)
attributes
comments
10. A constant object must be __________; it cannot be modified after it is created.
integer operands
setw
initialized
object-oriented analysis and design (OOAD)
11. A file must be ________ before data can be written to or read from it.
void
type casting (conversion)
floating-point
opened
12. Used to qualify hidden names so that they can be used.
&
scope resolution operator
vectors
base class
13. The process of placing the elements of an array in order is called ________ the array.
int values
char
sorting
linker
14. tab
initialized
type coercion
t
preprocessor
15. You must have a ___________ for every variable you intend to use in a program
definition
NULL
static
const datatype identifier = value
16. When a value of one data type is implicitly (automatically) changed to another data type
sorting
fstream
type coercion
//
17. Manipulator that causes the insertion point (cursor) to move to the beginning of the next line
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
18. Two slash marks ( // ) indicate __________ of a comment
strlen()
beginning
fixed
function prototype
19. Characters used to separate symbols or reserved words or identifiers and statements
register
reserve words
whitespace
return
20. Use 2 characters to represent one
/n
base class
escape sequences
syntax
21. 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.
Stack overflow
?
const
virtual functions
22. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
function overloading
access specifier
ofstream
void
23. The process of analyzing and designing a system from an object-oriented point of view is called ________.
before
static
object-oriented analysis and design (OOAD)
beginning
24. The three values that can be used to initialize a pointer are 0 - __________ and an address.
non-static
Preprocessor
NULL
beginning
25. The ________ enables access to a global variable with the same name as a variable in the current scope.
cin >> variable
unary scope resolution operator (::)
&
variables
26. Member objects are constructed __________ their enclosing class object.
strlen()
mixed expression
register
before
27. In inheritance the ____________ is the class the receives the inherited members.
recursive function
?
inline functions
derived class
28. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
setw
scope
function overloading
a.out
29. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
char
definition
/n
function scope
30. A function ________ enables a single function to be defined to perform a task on many different data types.
template
strcpy()
void pointer
type coercion
31. Keyword public is a(n) _________
loader
globals
access specifier
?
32. 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
break
base
delete
register
33. Program components in C++ are called functions and ________.
object file
pointer
stack
classes
34. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
#include
main
sorting
pointer
35. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
function prototype
private
data type
classes
36. Sets floating-point values to a fixed decimal format
polymorphism
fixed
syntax
like-type expression
37. The modulus operator (%) can be used only with __________.
sorting
integer operands
classes
type coercion
38. Classes can have relationships with other classes. These relationships are called ________.
named constant
Unified Modeling Language(UML)
associations
inline functions
39. A __________ should be used to declare the size of an array because it makes the program more scalable.
constant variable
base
?
opened
40. A filestream variable that represents the default input source
static_cast<char>(65)
cin
identifiers
floating-point
41. Names of things that are used in a program - can apply to variables & constants and functions
srand
identifiers
n
type
42. Class members specified as _________ are accessible anywhere an object of the class is in scope.
public
opened
cin
inheritance
43. The __________ operator reclaims memory previously allocated by new.
.cpp
recursive
&
delete
44. Returns the length of a string excluding the null terminator.
strlen()
classes
#include <headerfilename>
inheritance
45. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
fixed
operator overloading
selection
initialized
46. Whole numbers - no decimals and no commas included
int values
delete
non-static
local variable
47. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
beginning
escape sequences
inline functions
globals
48. The _________ begins the body of every function and the _________ ends the body of every function.
object file
strcmp()
{ }
recursive
49. 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.
like-type expression
?
delete
attributes
50. A function that calls itself
function prototype
stack
cout
recursive function