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 ________ enables access to a global variable with the same name as a variable in the current scope.
constant variable
function prototype
cmath
unary scope resolution operator (::)
2. A memory location with a name and data type - its content may be changed during program execution
special symbols
variable
fixed
object-oriented analysis and design (OOAD)
3. Every C++ statement ends with a(n) _________.
friend
data type
//
semicolon
4. The number used to refer to a particular element of an array is called its ________.
like-type expression
subscript (or index)
operator overloading
identifiers
5. Classes can have relationships with other classes. These relationships are called ________.
associations
preprocessor
public
strlen()
6. The storage-class specifiers are mutable - auto - ________ - extern and static.
allocating memory
rand
preprocessor
register
7. 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
public
recursive
srand
base
8. The stream extraction operator
variable
default constructor
>>
.cpp
9. If a member initializer is not provided for a member object of a class the object's __________ is called.
recursive
definition
default constructor
operator
10. directive A statement that starts with a # is called a ____________.
Default memberwise assignment
mixed expression
Preprocessor
vectors
11. A function that can be used to read character data including whitespace
pointer
variables
cin.get(ch)
opened
12. tab
void pointer
getline
rand
t
13. You can declare default values for a function in the ____________________.
constant variable
function parameters
stack
main
14. 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
data type
strcpy()
const datatype identifier = value
15. * / % + -
type casting (conversion)
Arithmetic Operators
const
attributes
16. A __________ should be used to declare the size of an array because it makes the program more scalable.
function call
.cpp
constant variable
return
17. Executable version of program
rand
object file
cmath
<<
18. For every opening brace in a C++ program there must be a ______________.
Closing brace
cin >> variable
Counter-controlled or definite
Arithmetic Operators
19. 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.
variable
information hiding
/n
Sentinel
20. The ________ qualifier is used to declare read-only variables.
ofstream
function overloading
Closing brace
const
21. Lists and tables of values can be stored in arrays or __________.
editor
global
vectors
like-type expression
22. The process of determining if an array contains a particular key value is called _________ the array.
#include <headerfilename>
information hiding
searching
register
23. Allows the programmer to store a value in a variable
scope
assignment statement
two-dimensional
void pointer
24. A constant object must be __________; it cannot be modified after it is created.
initialized
srand
named constant
type
25. Creates a copy of a string.
return
&
strcpy()
function overloading
26. An expression in which all operands have the same data type - result will have the same data type as operands
Preprocessor
static
like-type expression
void
27. Initializers __________ must be used to initialize constant members of a class.
member
semantics
editor
preprocessor
28. A variable that holds the address of another variable.
prompt
function scope
pointer
linker
29. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
editor
constant variable
data type
selection
30. newline
unary operator
n
return
polymorphism
31. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
beginning
return
if...else
Default memberwise assignment
32. All C++ Variables are_________.
% modulus
special symbols
?
case sensitive
33. Associate an identifier with a memory location
assignment
allocating memory
linker
opened
34. 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.
static
selection
object file
operator overloading
35. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
type casting (conversion)
const
preprocessor
globals
36. Type casting syntax
allocating memory
token
return
static_cast<char>(65)
37. 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.
void pointer
strcmp()
inheritance
operand value
38. The ________ program transfers the executable image of a C++ program from disk to memory.
before
assignment statement
loader
continue
39. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
strcpy()
register
getline
switch
40. The keyword ________ is used in a function header to indicate that a function does not return a value or to indicate that a function contains no parameters.
if
/n
void
arithmetic expression
41. The modulus operator (%) can be used only with __________.
integer operands
definition
token
variable
42. A variable that is known only within the function in which it is defined is called a ________.
data type
comments
local variable
reserve words
43. All ______ must be declared before they are used.
associations
binary operator
function overloading
variables
44. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
const datatype identifier = value
comments
Unified Modeling Language(UML)
stack
45. Syntax for named constant declaration
*
//
const datatype identifier = value
Closing brace
46. This manipulator is used to establish a field width for the value immediately following it.
setw
constant variable
heap
% modulus
47. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
function prototype
this
template
getline
48. Use 2 characters to represent one
escape sequences
dot (.)
object file
//
49. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
Stack overflow
#include <headerfilename>
this
like-type expression
50. Words that are used for special purposes in a program
reserved words
reserve words
data type
if...else