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. A __________ data member represents class-wide information.
showpoint
static
strcpy()
static_cast<char>(65)
2. 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.
globals
recursive function
>>
dot (.)
3. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
initialized
function scope
overloading
integer operands
4. An array that uses two subscripts is referred to as a(n) _________ array.
two-dimensional
>>
initialized
fstream
5. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
globals
reserved words
delete
source file
6. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
case sensitive
#include
fixed
.cpp
7. The stream insertion operator
char
getline
Semicolon
<<
8. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
constant variable
//
strlen()
like-type expression
9. Header file that contains commonly performed mathematical functions
cmath
>>
address
rand
10. 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.
{ }
const
source file
inheritance
11. Nonexecutable statements that are included in a program to provide information about what the program does etc.
editor
comments
subscript (or index)
cin >> variable
12. Returns the length of a string excluding the null terminator.
strlen()
if
const
opened
13. These are data items whose values do not change while the program is running
cin.get(ch)
Literals
auto
new line
14. A set of values together with a set of operations
non-static
assignment
data type
int values
15. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
Closing brace
named constant
continue
global
16. The ________ statement in a called function passes the value of an expression back to the calling function.
member
return
break
cin
17. Operator with two operands
binary operator
semicolon
before
identifiers
18. Syntax for named constant declaration
reserve words
const datatype identifier = value
Default memberwise assignment
n
19. This is used to mark the end of a complete C++ programming statement.
*
reserved words
recursive function
Semicolon
20. For every opening brace in a C++ program there must be a ______________.
left
Closing brace
static_cast<char>(65)
if...else
21. __________ can be used to assign an object of a class to another object of the same class.
Default memberwise assignment
constant variable
variable
Closing brace
22. In inheritance the ____________ is the class the receives the inherited members.
public
comments
return
derived class
23. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
void
overloading
switch
type casting (conversion)
24. Used for dynamically allocated variables
heap
special symbols
arithmetic expression
register
25. Keyword public is a(n) _________
access specifier
/n
t
recursive function
26. Use 2 characters to represent one
Preprocessor
floating-point
escape sequences
syntax
27. A filestream variable that represents the default input source
cout
?
vectors
cin
28. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
static_cast<char>(65)
Arithmetic Operators
Semicolon
cin >> variable
29. The symbol for the binary scope resolution operator
unary operator
initialized
inline functions
::
30. = & | are examples of ____________.
special symbols
comments
cin.get(ch)
access specifier
31. * / % + -
void pointer
return
private
Arithmetic Operators
32. A variable that holds the address of another variable.
ofstream
>>
cout
pointer
33. Allows the programmer to store a value in a variable
cin.get(ch)
private
assignment statement
&
34. A ________ program executes before the compiler's translation phase begins.
default constructor
Semicolon
preprocessor
base
35. Words that are used for special purposes in a program
private
reserved words
type coercion
void
36. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
*
address
return
data type
37. 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.
int values
Sentinel
classes
globals
38. Preprocessor directive syntax
#include <headerfilename>
base
if...else
derived class
39. The storage-class specifiers are mutable - auto - ________ - extern and static.
unary scope resolution operator (::)
searching
register
cin.get(ch)
40. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
getline
a.out
assignment
new line
41. A pointer is a variable that contains as its value the____________ of another variable.
allocating memory
function parameters
template
address
42. If a member initializer is not provided for a member object of a class the object's __________ is called.
operator overloading
global
default constructor
prompt
43. Every C++ program begins execution at the function _________.
main
static
% modulus
before
44. Operator with only one operand
pointer
return
token
unary operator
45. The ________ of an identifier is the portion of the program in which the identifier can be used.
fstream
return
operator
scope
46. The three values that can be used to initialize a pointer are 0 - __________ and an address.
<<
NULL
stack
semicolon
47. Names of things that are used in a program - can apply to variables & constants and functions
left
identifiers
<<
mixed expression
48. The sign you use for references
const
&
endl (same as 'n')
friend
49. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
prompt
recursive
function overloading
auto
50. The ________ qualifier is used to declare read-only variables.
type
escape sequences
classes
const