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. Used for dynamically allocated variables
Stack overflow
NULL
function call
heap
2. Names of things that are used in a program - can apply to variables & constants and functions
Literals
preprocessor
identifiers
/n
3. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
Stack overflow
Arithmetic Operators
rand
.cpp
4. Repeating a set of instructions a specific number of times is called_________repetition.
friend
Counter-controlled or definite
prompt
ofstream
5. A type of pointer that can point at objects of any data type.
function overloading
friend
operator overloading
void pointer
6. Program components in C++ are called functions and ________.
cmath
Semicolon
classes
like-type expression
7. This is used to mark the end of a complete C++ programming statement.
void
strcmp()
Semicolon
recursive function
8. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
operator
const datatype identifier = value
arithmetic expression
void
9. A member function should be declared static if it does not access __________ class members.
non-static
base
function scope
integer operands
10. You can declare default values for a function in the ____________________.
cin >> variable
function parameters
virtual functions
type coercion
11. A ________ program executes before the compiler's translation phase begins.
preprocessor
associations
opened
polymorphism
12. All C++ Variables are_________.
arithmetic expression
case sensitive
base
fstream
13. To allow file access in a program you must #include this header file.
fstream
before
friend
private
14. newline
unary operator
assignment statement
Arithmetic Operators
n
15. 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.
object file
information hiding
<<
selection
16. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
NULL
if...else
two-dimensional
return
17. Symbol that denotes an action to be performed
operator
two-dimensional
operator overloading
.cpp
18. The sign you use for pointers
*
before
recursive
&
19. The __________ operator reclaims memory previously allocated by new.
Sentinel
escape sequences
delete
Closing brace
20. A function that calls itself
associations
constant variable
two-dimensional
recursive function
21. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
selection
this
Sentinel
inline functions
22. Whole numbers - no decimals and no commas included
register
private
int values
type coercion
23. 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.
reserve words
heap
static
syntax
24. The _________ begins the body of every function and the _________ ends the body of every function.
{ }
binary operator
vectors
arithmetic expression
25. The three values that can be used to initialize a pointer are 0 - __________ and an address.
NULL
function parameters
classes
//
26. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
classes
arithmetic expression
strcpy()
srand
27. C++ programs are normally typed into a computer using a(n) ________ program.
heap
object file
editor
setw
28. When a value of one data type is implicitly (automatically) changed to another data type
binary operator
function scope
semantics
type coercion
29. Message displayed to the screen asking user for input; generated with an output statement
globals
prompt
::
main
30. Syntax for named constant declaration
identifiers
const datatype identifier = value
NULL
#include <headerfilename>
31. The elements of an array are related by the fact that they have the same name and ___________.
function parameters
unary operator
type
binary operator
32. A function ________ enables a single function to be defined to perform a task on many different data types.
register
cin.get(ch)
template
a.out
33. Use 2 characters to represent one
derived class
#include
dot (.)
escape sequences
34. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
if
unary scope resolution operator (::)
switch
operator overloading
35. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
operator
attributes
recursive
::
36. Keyword public is a(n) _________
virtual functions
access specifier
delete
return
37. An expression in which all operands have the same data type - result will have the same data type as operands
const datatype identifier = value
type casting (conversion)
like-type expression
beginning
38. You must have a ___________ for every variable you intend to use in a program
opened
break
Unified Modeling Language(UML)
definition
39. To write data to a file you define an object of which one of the following
?
function call
ofstream
strcpy()
40. The ________ statement in a called function passes the value of an expression back to the calling function.
return
auto
vectors
selection
41. To explicitly indicate that a value is to be converted to another type
definition
default constructor
type casting (conversion)
preprocessor
42. A file must be ________ before data can be written to or read from it.
opened
classes
beginning
&
43. A __________ data member represents class-wide information.
static
operator overloading
Sentinel
access specifier
44. * / % + -
whitespace
Arithmetic Operators
strlen()
dot (.)
45. Sets floating-point values to a fixed decimal format
delete
fixed
definition
prompt
46. The number used to refer to a particular element of an array is called its ________.
void pointer
if...else
subscript (or index)
floating-point
47. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
t
a.out
operator
char
48. These are data items whose values do not change while the program is running
/n
Literals
default constructor
arithmetic expression
49. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
public
non-static
type coercion
cin >> variable
50. A pointer is a variable that contains as its value the____________ of another variable.
address
recursive
inline functions
Counter-controlled or definite