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 four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
{ }
?
Semicolon
globals
2. The only integer that can be assigned directly to a pointer is_____________.
new line
0
&
fixed
3. Every C++ statement ends with a(n) _________.
opened
semicolon
delete
special symbols
4. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
#include
fixed
semicolon
like-type expression
5. 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.
default constructor
definition
virtual functions
recursive
6. 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
assignment
void
Unified Modeling Language(UML)
7. In inheritance the ____________ is the class the receives the inherited members.
register
cmath
derived class
global
8. data types that refer to numbers with decimals
const
unary operator
*
floating-point
9. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
before
definition
getline
variable
10. A __________ should be used to declare the size of an array because it makes the program more scalable.
constant variable
variable
function prototype
type
11. A function that calls itself
strcpy()
recursive function
recursive
derived class
12. The ________ program combines the output of the compiler with various library functions to produce an executable image.
cout
linker
return
classes
13. Type casting syntax
global
static_cast<char>(65)
scope resolution operator
classes
14. When a value of one data type is implicitly (automatically) changed to another data type
type coercion
Arithmetic Operators
Stack overflow
left
15. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
register
object file
delete
&
16. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
token
stack
overloading
operator overloading
17. Most calculations are normally performed by ______ statements.
static
virtual functions
assignment
identifiers
18. A C++ statement that makes a decision is ______.
rand
special symbols
semantics
if
19. A file must be ________ before data can be written to or read from it.
variable
Default memberwise assignment
opened
a.out
20. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
type
pointer
//
assignment
21. Naming convention for C++ programs
.cpp
type coercion
break
template
22. Characters used to separate symbols or reserved words or identifiers and statements
this
{ }
whitespace
variable
23. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
srand
{ }
inline functions
semantics
24. Creates a copy of a string.
floating-point
associations
strcpy()
continue
25. In inheritance the ____________ is the class that supplies the inherited members.
base class
derived class
reserved words
floating-point
26. The ________ program transfers the executable image of a C++ program from disk to memory.
loader
auto
identifiers
void pointer
27. The three values that can be used to initialize a pointer are 0 - __________ and an address.
escape sequences
object-oriented analysis and design (OOAD)
function prototype
NULL
28. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
integer operands
return
continue
rand
29. The sign you use for pointers
Preprocessor
operator
*
vectors
30. directive A statement that starts with a # is called a ____________.
recursive
mixed expression
Semicolon
Preprocessor
31. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
function scope
address
non-static
token
32. You can declare default values for a function in the ____________________.
pointer
access specifier
function parameters
type casting (conversion)
33. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
private
setw
unary scope resolution operator (::)
break
34. The process of determining if an array contains a particular key value is called _________ the array.
variable
searching
default constructor
linker
35. The sign you use for references
register
Closing brace
&
derived class
36. The symbol for the binary scope resolution operator
preprocessor
strcmp()
editor
::
37. Keyword public is a(n) _________
recursive function
access specifier
Unified Modeling Language(UML)
floating-point
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.
void pointer
/n
inline functions
auto
39. The ________ enables access to a global variable with the same name as a variable in the current scope.
like-type expression
fstream
rand
unary scope resolution operator (::)
40. Lists and tables of values can be stored in arrays or __________.
overloading
cin
vectors
recursive
41. = & | are examples of ____________.
int values
NULL
special symbols
mixed expression
42. The __________ operator reclaims memory previously allocated by new.
Counter-controlled or definite
delete
Unified Modeling Language(UML)
Preprocessor
43. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
this
static
#include directive
comments
44. Program components in C++ are called functions and ________.
classes
linker
non-static
pointer
45. A __________ data member represents class-wide information.
static
const
reserve words
reserved words
46. Executable version of program
pointer
heap
object file
information hiding
47. 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
type coercion
globals
register
base
48. This manipulator is used to establish a field width for the value immediately following it.
searching
setw
recursive function
reserved words
49. int namespace include using return examples of ___________
virtual functions
assignment
void
reserve words
50. The address-of operator. it is used to assign pointers and to print the address of variables.
token
pointer
&
if