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. An expression in which all operands have the same data type - result will have the same data type as operands
register
arithmetic expression
function overloading
like-type expression
2. A sequence of operands and operators that describe a calculation to be performed
inheritance
arithmetic expression
token
strcmp()
3. 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.
default constructor
dot (.)
private
two-dimensional
4. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
case sensitive
switch
named constant
function call
5. A variable that holds the address of another variable.
pointer
Sentinel
a.out
address
6. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
Literals
void
#include
auto
7. Naming convention for C++ programs
int values
allocating memory
cin
.cpp
8. Repeating a set of instructions a specific number of times is called_________repetition.
local variable
void
overloading
Counter-controlled or definite
9. int namespace include using return examples of ___________
reserve words
object file
static_cast<char>(65)
return
10. The _________ begins the body of every function and the _________ ends the body of every function.
{ }
this
function call
ofstream
11. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
object file
Stack overflow
Semicolon
function prototype
12. Member objects are constructed __________ their enclosing class object.
before
pointer
cin >> variable
strcpy()
13. The process of placing the elements of an array in order is called ________ the array.
type coercion
sorting
associations
char
14. The ________ qualifier is used to declare read-only variables.
const
strcmp()
classes
virtual functions
15. Names of things that are used in a program - can apply to variables & constants and functions
fstream
void pointer
identifiers
opened
16. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
auto
register
scope
beginning
17. When a value of one data type is implicitly (automatically) changed to another data type
type coercion
a.out
new line
left
18. The sign you use for pointers
Counter-controlled or definite
derived class
*
auto
19. This is used to mark the end of a complete C++ programming statement.
inheritance
beginning
&
Semicolon
20. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
if...else
public
static_cast<char>(65)
//
21. The _____ causes the contents of another file to be inserted into a program.
function prototype
cin.get(ch)
const
#include directive
22. In inheritance the ____________ is the class the receives the inherited members.
derived class
cin.get(ch)
inheritance
register
23. The size & shape & color and weight of an object are considered
auto
attributes
linker
floating-point
24. All C++ Variables are_________.
getline
classes
case sensitive
scope resolution operator
25. Class members specified as _________ are accessible anywhere an object of the class is in scope.
public
base
pointer
const
26. tab
t
cout
fixed
operator
27. The elements of an array are related by the fact that they have the same name and ___________.
identifiers
void
type
function scope
28. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
return
token
integer operands
base
29. Sets floating-point values to a fixed decimal format
{ }
fixed
void
before
30. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
operator overloading
&
escape sequences
static_cast<char>(65)
31. Executable version of program
void
object file
strlen()
operator
32. The sign you use for references
if...else
&
fixed
type
33. Used for dynamically allocated variables
this
base
integer operands
heap
34. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
return
type coercion
char
function prototype
35. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
0
recursive
::
global
36. The idea that you can call the same function and the output will depend on the type of object you're using.
polymorphism
arithmetic expression
subscript (or index)
public
37. 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
variable
% modulus
base
NULL
38. To explicitly indicate that a value is to be converted to another type
continue
type casting (conversion)
endl (same as 'n')
before
39. A filestream variable that represents the default input source
escape sequences
cin
inheritance
const
40. A variable declared outside any block or function is a ________ variable.
left
recursive function
global
scope resolution operator
41. A member function should be declared static if it does not access __________ class members.
default constructor
non-static
cin
Stack overflow
42. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
named constant
ofstream
return
semantics
43. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
type
const
semicolon
cin >> variable
44. Default name of executable file
strlen()
#include directive
a.out
constant variable
45. A variable that is known only within the function in which it is defined is called a ________.
floating-point
heap
/n
local variable
46. For every opening brace in a C++ program there must be a ______________.
switch
recursive function
{ }
Closing brace
47. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
floating-point
this
attributes
reserve words
48. Header file that contains commonly performed mathematical functions
new line
whitespace
cmath
n
49. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
this
strcpy()
break
*
50. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
associations
friend
dot (.)
n