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. Executable version of program
NULL
inline functions
object file
static
2. int namespace include using return examples of ___________
base class
arithmetic expression
0
reserve words
3. A human readable file that contains C++ program
source file
return
main
global
4. Function ________ is used to produce random numbers.
preprocessor
fstream
rand
base
5. 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.
ofstream
selection
information hiding
//
6. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
attributes
register
function parameters
preprocessor
7. 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.
/n
arithmetic expression
?
searching
8. If a member initializer is not provided for a member object of a class the object's __________ is called.
default constructor
fstream
setw
left
9. Naming convention for C++ programs
comments
left
.cpp
linker
10. An array that uses two subscripts is referred to as a(n) _________ array.
two-dimensional
before
void
register
11. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
private
function scope
Literals
static_cast<char>(65)
12. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
new line
identifiers
linker
base
13. Words that are used for special purposes in a program
prompt
heap
reserved words
new line
14. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
definition
mixed expression
char
stack
15. Used for function calls and local variables
ofstream
strlen()
stack
associations
16. The ________ of an identifier is the portion of the program in which the identifier can be used.
scope
operand value
floating-point
object file
17. 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.
virtual functions
globals
editor
&
18. 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.
inheritance
0
initialized
named constant
19. A sequence of operands and operators that describe a calculation to be performed
named constant
arithmetic expression
reserved words
type casting (conversion)
20. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
const
type coercion
main
srand
21. = & | are examples of ____________.
stack
special symbols
initialized
recursive function
22. Most calculations are normally performed by ______ statements.
endl (same as 'n')
if
% modulus
assignment
23. A variable declared outside any block or function is a ________ variable.
#include
pointer
global
assignment statement
24. The elements of an array are related by the fact that they have the same name and ___________.
reserved words
reserve words
special symbols
type
25. To explicitly indicate that a value is to be converted to another type
main
data type
type casting (conversion)
*
26. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
fstream
scope resolution operator
overloading
escape sequences
27. Associate an identifier with a memory location
allocating memory
dot (.)
srand
assignment statement
28. All ______ must be declared before they are used.
type coercion
variables
assignment statement
void
29. 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.
main
dot (.)
Closing brace
base class
30. A variable that is known only within the function in which it is defined is called a ________.
variable
local variable
Preprocessor
auto
31. Allows the programmer to store a value in a variable
assignment statement
before
Stack overflow
vectors
32. An expression in which all operands have the same data type - result will have the same data type as operands
like-type expression
//
auto
prompt
33. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
switch
heap
>>
this
34. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
local variable
Unified Modeling Language(UML)
cin >> variable
reserve words
35. The number used to refer to a particular element of an array is called its ________.
void
#include
subscript (or index)
return
36. Every C++ statement ends with a(n) _________.
editor
semicolon
fstream
inheritance
37. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
token
scope
loader
static
38. 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.
/n
setw
linker
Closing brace
39. All C++ Variables are_________.
preprocessor
case sensitive
/n
>>
40. The process of determining if an array contains a particular key value is called _________ the array.
strcpy()
searching
object file
pointer
41. Keyword public is a(n) _________
strcmp()
access specifier
{ }
left
42. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
semantics
Unified Modeling Language(UML)
auto
cin
43. Type casting syntax
integer operands
Counter-controlled or definite
static_cast<char>(65)
new line
44. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
before
searching
Stack overflow
inheritance
45. A type of pointer that can point at objects of any data type.
function call
0
arithmetic expression
void pointer
46. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
private
switch
vectors
constant variable
47. Member objects are constructed __________ their enclosing class object.
dot (.)
template
before
like-type expression
48. Syntax for named constant declaration
>>
semicolon
const datatype identifier = value
getline
49. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
pointer
auto
setw
syntax
50. Used for dynamically allocated variables
heap
static
object-oriented analysis and design (OOAD)
associations