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. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
operator
register
syntax
Stack overflow
2. A __________ data member represents class-wide information.
Arithmetic Operators
static
function overloading
friend
3. 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.
operator
void
cmath
mixed expression
4. 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.
information hiding
new line
inline functions
escape sequences
5. __________ can be used to assign an object of a class to another object of the same class.
Arithmetic Operators
Default memberwise assignment
rand
const datatype identifier = value
6. 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.
mixed expression
special symbols
inheritance
scope
7. An array that uses two subscripts is referred to as a(n) _________ array.
recursive
two-dimensional
if...else
&
8. The process of determining if an array contains a particular key value is called _________ the array.
searching
Stack overflow
pointer
Literals
9. A pointer is a variable that contains as its value the____________ of another variable.
global
arithmetic expression
address
int values
10. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
preprocessor
function parameters
preprocessor
#include
11. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
allocating memory
classes
recursive function
named constant
12. directive A statement that starts with a # is called a ____________.
unary operator
binary operator
Preprocessor
Stack overflow
13. Whole numbers - no decimals and no commas included
int values
delete
strlen()
stack
14. The process of placing the elements of an array in order is called ________ the array.
sorting
static
mixed expression
classes
15. Operator with two operands
#include directive
reserved words
linker
binary operator
16. This manipulator is used to establish a field width for the value immediately following it.
setw
operator overloading
information hiding
globals
17. Syntax for named constant declaration
identifiers
const datatype identifier = value
showpoint
main
18. 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.
semantics
/n
static
#include
19. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
operator
#include
semantics
allocating memory
20. A __________ should be used to declare the size of an array because it makes the program more scalable.
constant variable
preprocessor
//
return
21. Used for function calls and local variables
recursive function
NULL
<<
stack
22. A filestream variable that represents the default output device
stack
cout
floating-point
static_cast<char>(65)
23. Naming convention for C++ programs
.cpp
constant variable
reserve words
const
24. Compares two strings and returns 0 if they are equal.
local variable
global
operator overloading
strcmp()
25. The stream insertion operator
classes
template
<<
void
26. If a member initializer is not provided for a member object of a class the object's __________ is called.
default constructor
token
virtual functions
void pointer
27. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
two-dimensional
function call
/n
friend
28. This manipulator causes the field to be left-justified with padding spaces printed to the right.
return
Counter-controlled or definite
void
left
29. 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
object file
>>
base
function call
30. A filestream variable that represents the default input source
n
ofstream
cin
return
31. Keyword public is a(n) _________
operand value
semicolon
NULL
access specifier
32. 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.
Sentinel
void
dot (.)
operator overloading
33. The ________ statement in a called function passes the value of an expression back to the calling function.
void pointer
whitespace
return
showpoint
34. Operator with only one operand
main
unary operator
auto
globals
35. The three values that can be used to initialize a pointer are 0 - __________ and an address.
Literals
vectors
NULL
member
36. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
break
binary operator
Counter-controlled or definite
classes
37. Characters used to separate symbols or reserved words or identifiers and statements
n
semicolon
whitespace
function call
38. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
char
base
main
virtual functions
39. A type of pointer that can point at objects of any data type.
scope
static
*
void pointer
40. The ________ program combines the output of the compiler with various library functions to produce an executable image.
special symbols
linker
cin.get(ch)
cin
41. Symbol that denotes an action to be performed
operator
if
assignment
preprocessor
42. Classes can have relationships with other classes. These relationships are called ________.
searching
associations
assignment
data type
43. The symbol for the binary scope resolution operator
::
#include <headerfilename>
if...else
heap
44. tab
ofstream
cin
static
t
45. Sets floating-point values to a fixed decimal format
assignment
srand
fixed
mixed expression
46. The storage-class specifiers are mutable - auto - ________ - extern and static.
operator overloading
register
floating-point
semicolon
47. All C++ Variables are_________.
NULL
//
case sensitive
editor
48. Used for dynamically allocated variables
heap
new line
named constant
&
49. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
strcpy()
function overloading
Sentinel
unary operator
50. C++ programs are normally typed into a computer using a(n) ________ program.
editor
function parameters
ofstream
variables