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. Lists and tables of values can be stored in arrays or __________.
static
vectors
?
#include
2. Member objects are constructed __________ their enclosing class object.
#include <headerfilename>
named constant
0
before
3. A __________ should be used to declare the size of an array because it makes the program more scalable.
const
constant variable
function overloading
recursive
4. All C++ Variables are_________.
case sensitive
setw
classes
selection
5. In inheritance the ____________ is the class that supplies the inherited members.
char
base class
integer operands
Closing brace
6. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
this
base
preprocessor
0
7. 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.
Semicolon
strcpy()
object file
/n
8. data types that refer to numbers with decimals
linker
derived class
floating-point
member
9. Default name of executable file
cout
a.out
static_cast<char>(65)
&
10. An expression in which all operands have the same data type - result will have the same data type as operands
void
address
virtual functions
like-type expression
11. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
new line
object file
pointer
type casting (conversion)
12. Executable version of program
this
syntax
arithmetic expression
object file
13. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
access specifier
data type
operator overloading
const datatype identifier = value
14. A memory location with a name and data type - its content may be changed during program execution
variable
default constructor
heap
function call
15. The process of placing the elements of an array in order is called ________ the array.
sorting
function call
integer operands
semicolon
16. Two slash marks ( // ) indicate __________ of a comment
inheritance
non-static
information hiding
beginning
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. A variable declared outside any block or function is a ________ variable.
global
object-oriented analysis and design (OOAD)
definition
void
19. A variable that holds the address of another variable.
#include <headerfilename>
globals
*
pointer
20. Nonexecutable statements that are included in a program to provide information about what the program does etc.
<<
#include directive
ofstream
comments
21. The ________ program combines the output of the compiler with various library functions to produce an executable image.
pointer
linker
friend
Counter-controlled or definite
22. The only integer that can be assigned directly to a pointer is_____________.
char
selection
0
stack
23. A function is invoked with a ________.
register
function call
static
special symbols
24. Class members are accessed via the ________ operator in conjunction with the name of an object (or reference to an object) of the class or via the arrow (->) operator in conjunction with a pointer to an object of the class.
endl (same as 'n')
0
unary operator
dot (.)
25. Characters used to separate symbols or reserved words or identifiers and statements
whitespace
Counter-controlled or definite
integer operands
&
26. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
public
setw
//
information hiding
27. A constant object must be __________; it cannot be modified after it is created.
int values
fstream
initialized
Arithmetic Operators
28. Header file that contains commonly performed mathematical functions
static_cast<char>(65)
cmath
arithmetic expression
>>
29. The three values that can be used to initialize a pointer are 0 - __________ and an address.
two-dimensional
unary scope resolution operator (::)
semantics
NULL
30. The ________ enables access to a global variable with the same name as a variable in the current scope.
<<
non-static
unary scope resolution operator (::)
#include <headerfilename>
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.
reserve words
void
Sentinel
register
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
classes
base
type casting (conversion)
static
33. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
recursive function
cin >> variable
two-dimensional
main
34. The modulus operator (%) can be used only with __________.
Sentinel
//
opened
integer operands
35. The ________ of an identifier is the portion of the program in which the identifier can be used.
setw
prompt
t
scope
36. The address-of operator. it is used to assign pointers and to print the address of variables.
% modulus
dot (.)
overloading
&
37. A function that can be used to read character data including whitespace
information hiding
linker
cin.get(ch)
editor
38. When a value of one data type is implicitly (automatically) changed to another data type
definition
overloading
type coercion
default constructor
39. A pointer is a variable that contains as its value the____________ of another variable.
member
address
overloading
t
40. Preprocessor directive syntax
Closing brace
#include <headerfilename>
&
binary operator
41. Initializers __________ must be used to initialize constant members of a class.
before
endl (same as 'n')
function prototype
member
42. The ________ qualifier is used to declare read-only variables.
local variable
cin.get(ch)
const
searching
43. The ________ program transfers the executable image of a C++ program from disk to memory.
&
loader
before
definition
44. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
Unified Modeling Language(UML)
syntax
escape sequences
void
45. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
Preprocessor
const
return
.cpp
46. Class members specified as _________ are accessible anywhere an object of the class is in scope.
public
main
derived class
searching
47. The symbol for the binary scope resolution operator
searching
::
access specifier
auto
48. The sign you use for references
cin >> variable
&
pointer
::
49. C++ programs are normally typed into a computer using a(n) ________ program.
operator
initialized
editor
cin.get(ch)
50. Used to qualify hidden names so that they can be used.
/n
return
Stack overflow
scope resolution operator