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.
two-dimensional
Stack overflow
operator overloading
non-static
2. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
cin.get(ch)
#include
base class
source file
3. To allow file access in a program you must #include this header file.
address
fstream
Preprocessor
classes
4. Used to qualify hidden names so that they can be used.
&
a.out
scope resolution operator
static_cast<char>(65)
5. Associate an identifier with a memory location
dot (.)
pointer
allocating memory
fixed
6. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
type casting (conversion)
Closing brace
endl (same as 'n')
inline functions
7. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
allocating memory
information hiding
semantics
return
8. Classes can have relationships with other classes. These relationships are called ________.
mixed expression
return
associations
floating-point
9. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
endl (same as 'n')
char
recursive
&
10. Forces the computer to display decimal point and trailing zeroes
showpoint
variable
::
cout
11. The __________ operator reclaims memory previously allocated by new.
assignment statement
break
access specifier
delete
12. = & | are examples of ____________.
private
cout
function call
special symbols
13. Executable version of program
function overloading
Literals
derived class
object file
14. Default name of executable file
int values
type
a.out
#include directive
15. 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.
base class
globals
data type
/n
16. Every C++ program begins execution at the function _________.
main
base
int values
setw
17. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
if...else
Unified Modeling Language(UML)
overloading
function call
18. A function is invoked with a ________.
.cpp
?
function call
arithmetic expression
19. To explicitly indicate that a value is to be converted to another type
type casting (conversion)
recursive
scope
main
20. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
polymorphism
switch
address
private
21. 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.
preprocessor
searching
dot (.)
return
22. 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.
?
heap
strcmp()
fstream
23. A variable that is known only within the function in which it is defined is called a ________.
main
before
local variable
Sentinel
24. Characters used to separate symbols or reserved words or identifiers and statements
identifiers
#include
whitespace
static
25. A __________ data member represents class-wide information.
switch
Unified Modeling Language(UML)
static
opened
26. A human readable file that contains C++ program
char
source file
reserve words
variables
27. The idea that you can call the same function and the output will depend on the type of object you're using.
sorting
polymorphism
syntax
type casting (conversion)
28. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
?
&
semantics
variable
29. A C++ statement that makes a decision is ______.
Default memberwise assignment
if
?
local variable
30. The process of placing the elements of an array in order is called ________ the array.
sorting
template
strcpy()
char
31. Whole numbers - no decimals and no commas included
n
return
int values
named constant
32. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
if...else
beginning
const
constant variable
33. Nonexecutable statements that are included in a program to provide information about what the program does etc.
scope resolution operator
break
const
comments
34. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
this
new line
function scope
return
35. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
cmath
recursive
linker
char
36. Two slash marks ( // ) indicate __________ of a comment
preprocessor
int values
beginning
token
37. The process of determining if an array contains a particular key value is called _________ the array.
left
searching
operand value
variables
38. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
Unified Modeling Language(UML)
opened
Sentinel
private
39. tab
heap
t
0
cin >> variable
40. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
Literals
identifiers
#include directive
token
41. Operator with only one operand
operator overloading
unary operator
Sentinel
inline functions
42. Used for function calls and local variables
floating-point
.cpp
Literals
stack
43. A constant object must be __________; it cannot be modified after it is created.
return
initialized
?
overloading
44. The size & shape & color and weight of an object are considered
attributes
template
delete
function call
45. The symbol for the binary scope resolution operator
stack
variables
int values
::
46. The sign you use for pointers
special symbols
*
{ }
&
47. The modulus operator (%) can be used only with __________.
arithmetic expression
void
integer operands
//
48. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
heap
Preprocessor
function prototype
return
49. If a member initializer is not provided for a member object of a class the object's __________ is called.
sorting
Stack overflow
char
default constructor
50. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
rand
#include
scope
globals