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 ________ program transfers the executable image of a C++ program from disk to memory.
type
loader
inheritance
function overloading
2. A variable that is known only within the function in which it is defined is called a ________.
cin.get(ch)
if...else
local variable
scope
3. The ________ of an identifier is the portion of the program in which the identifier can be used.
scope
base class
whitespace
strlen()
4. Words that are used for special purposes in a program
NULL
setw
reserved words
const
5. Operator with only one operand
static_cast<char>(65)
type
unary operator
preprocessor
6. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
recursive function
Unified Modeling Language(UML)
two-dimensional
classes
7. Executable version of program
scope resolution operator
dot (.)
type coercion
object file
8. Used to qualify hidden names so that they can be used.
scope resolution operator
rand
like-type expression
constant variable
9. The idea that you can call the same function and the output will depend on the type of object you're using.
recursive function
whitespace
polymorphism
local variable
10. You must have a ___________ for every variable you intend to use in a program
public
return
//
definition
11. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
NULL
showpoint
Default memberwise assignment
const
12. A __________ data member represents class-wide information.
binary operator
static_cast<char>(65)
static
loader
13. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
//
heap
pointer
ofstream
14. All C++ Variables are_________.
public
case sensitive
beginning
void
15. The only integer that can be assigned directly to a pointer is_____________.
binary operator
function scope
0
t
16. A file must be ________ before data can be written to or read from it.
two-dimensional
associations
allocating memory
opened
17. When a value of one data type is implicitly (automatically) changed to another data type
base class
type coercion
initialized
Stack overflow
18. To allow file access in a program you must #include this header file.
data type
attributes
const
fstream
19. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
reserved words
semantics
information hiding
assignment
20. In inheritance the ____________ is the class that supplies the inherited members.
base class
fstream
NULL
cout
21. An expression in which all operands have the same data type - result will have the same data type as operands
floating-point
constant variable
like-type expression
type coercion
22. A function that calls itself
recursive function
setw
#include
Counter-controlled or definite
23. Function ________ is used to set the random number seed to randomize a program.
cmath
srand
#include
Default memberwise assignment
24. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
variables
overloading
assignment
private
25. The symbol for the binary scope resolution operator
inline functions
cmath
globals
::
26. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
globals
const
t
void pointer
27. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
register
derived class
{ }
void
28. Member objects are constructed __________ their enclosing class object.
syntax
before
Semicolon
derived class
29. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
if...else
public
cin.get(ch)
getline
30. Associate an identifier with a memory location
<<
friend
{ }
allocating memory
31. The process of determining if an array contains a particular key value is called _________ the array.
#include
return
loader
searching
32. This manipulator causes the field to be left-justified with padding spaces printed to the right.
local variable
editor
Stack overflow
left
33. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
object file
cin
inline functions
scope
34. Every C++ statement ends with a(n) _________.
semicolon
arithmetic expression
object file
cin >> variable
35. The modulus operator (%) can be used only with __________.
const
integer operands
semicolon
dot (.)
36. This is used to mark the end of a complete C++ programming statement.
strlen()
Semicolon
like-type expression
n
37. The size & shape & color and weight of an object are considered
void pointer
attributes
case sensitive
int values
38. The _________ begins the body of every function and the _________ ends the body of every function.
rand
address
variable
{ }
39. tab
variables
address
t
friend
40. An array that uses two subscripts is referred to as a(n) _________ array.
definition
two-dimensional
const
void pointer
41. Header file that contains commonly performed mathematical functions
floating-point
cmath
beginning
semicolon
42. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
int values
//
constant variable
Stack overflow
43. newline
strlen()
continue
member
n
44. directive A statement that starts with a # is called a ____________.
*
Preprocessor
floating-point
stack
45. The number used to refer to a particular element of an array is called its ________.
vectors
char
pointer
subscript (or index)
46. Type casting syntax
static_cast<char>(65)
register
like-type expression
main
47. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
function scope
operand value
setw
overloading
48. 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.
.cpp
syntax
void pointer
Sentinel
49. Symbol that denotes an action to be performed
Closing brace
const
operator
subscript (or index)
50. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
const
break
Stack overflow
function scope