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. 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
2. Executable version of program
object file
beginning
n
recursive function
3. A __________ should be used to declare the size of an array because it makes the program more scalable.
dot (.)
constant variable
semicolon
initialized
4. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
srand
ofstream
selection
base
5. To allow file access in a program you must #include this header file.
derived class
strcmp()
if
fstream
6. Initializers __________ must be used to initialize constant members of a class.
member
.cpp
getline
const
7. The process of placing the elements of an array in order is called ________ the array.
identifiers
cin.get(ch)
sorting
recursive
8. 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.
beginning
Sentinel
function call
&
9. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
function overloading
prompt
variable
token
10. Words that are used for special purposes in a program
reserved words
static_cast<char>(65)
type casting (conversion)
named constant
11. Use 2 characters to represent one
static
constant variable
escape sequences
variables
12. Most calculations are normally performed by ______ statements.
initialized
derived class
assignment
void pointer
13. Default name of executable file
operand value
a.out
preprocessor
unary scope resolution operator (::)
14. The ________ of an identifier is the portion of the program in which the identifier can be used.
getline
scope
auto
showpoint
15. If a member initializer is not provided for a member object of a class the object's __________ is called.
definition
default constructor
reserved words
.cpp
16. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
private
if...else
globals
% modulus
17. 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.
information hiding
fstream
cin
friend
18. The ________ program transfers the executable image of a C++ program from disk to memory.
loader
pointer
object file
prompt
19. = & | are examples of ____________.
public
special symbols
main
opened
20. These are data items whose values do not change while the program is running
Literals
static_cast<char>(65)
>>
information hiding
21. Operator with only one operand
switch
unary operator
static
base
22. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
Stack overflow
Counter-controlled or definite
Literals
definition
23. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
left
getline
semantics
information hiding
24. The process of determining if an array contains a particular key value is called _________ the array.
searching
linker
Sentinel
access specifier
25. A function that can be used to read character data including whitespace
reserved words
cin.get(ch)
strcpy()
#include
26. Repeating a set of instructions a specific number of times is called_________repetition.
Counter-controlled or definite
non-static
function call
*
27. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
classes
prompt
switch
//
28. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
main
function call
const
two-dimensional
29. Class members specified as _________ are accessible anywhere an object of the class is in scope.
if
Literals
public
mixed expression
30. newline
n
attributes
access specifier
a.out
31. Every C++ statement ends with a(n) _________.
endl (same as 'n')
semicolon
Preprocessor
type
32. To explicitly indicate that a value is to be converted to another type
opened
two-dimensional
type coercion
type casting (conversion)
33. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
identifiers
syntax
if...else
member
34. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
this
virtual functions
arithmetic expression
static
35. Function ________ is used to produce random numbers.
rand
&
cin.get(ch)
case sensitive
36. The sign you use for references
object-oriented analysis and design (OOAD)
&
setw
two-dimensional
37. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
strcmp()
#include
Stack overflow
operator overloading
38. A sequence of operands and operators that describe a calculation to be performed
#include
heap
arithmetic expression
pointer
39. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
#include
prompt
void pointer
this
40. Syntax for named constant declaration
scope resolution operator
const datatype identifier = value
&
Closing brace
41. Nonexecutable statements that are included in a program to provide information about what the program does etc.
comments
static
cin.get(ch)
access specifier
42. Forces the computer to display decimal point and trailing zeroes
Sentinel
base class
showpoint
address
43. This manipulator is used to establish a field width for the value immediately following it.
setw
assignment
constant variable
t
44. A filestream variable that represents the default input source
&
overloading
type coercion
cin
45. 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.
preprocessor
static
reserve words
a.out
46. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
inline functions
Unified Modeling Language(UML)
continue
Default memberwise assignment
47. Names of things that are used in a program - can apply to variables & constants and functions
?
cin >> variable
identifiers
Sentinel
48. The only integer that can be assigned directly to a pointer is_____________.
0
Closing brace
private
<<
49. 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.
if
delete
Closing brace
virtual functions
50. Preprocessor directive syntax
#include <headerfilename>
linker
address
/n