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. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
Default memberwise assignment
binary operator
Semicolon
void
2. * / % + -
heap
{ }
editor
Arithmetic Operators
3. A function that calls itself
scope resolution operator
whitespace
Default memberwise assignment
recursive function
4. A variable that is known only within the function in which it is defined is called a ________.
/n
local variable
pointer
named constant
5. A filestream variable that represents the default output device
stack
register
subscript (or index)
cout
6. When a value of one data type is implicitly (automatically) changed to another data type
inline functions
local variable
type coercion
unary scope resolution operator (::)
7. Every C++ statement ends with a(n) _________.
heap
semicolon
base class
return
8. The ________ enables access to a global variable with the same name as a variable in the current scope.
const datatype identifier = value
base
0
unary scope resolution operator (::)
9. A function is invoked with a ________.
Closing brace
?
selection
function call
10. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
getline
recursive function
srand
Default memberwise assignment
11. The stream extraction operator
syntax
cin
>>
new line
12. Words that are used for special purposes in a program
reserved words
base
fixed
cin >> variable
13. The elements of an array are related by the fact that they have the same name and ___________.
ofstream
friend
type
static
14. Program components in C++ are called functions and ________.
type
if
classes
&
15. Causes the program to immediately goes back to the top of the loop. the remainder of the statements in the loop are ignored for this current iteration.
t
mixed expression
assignment
continue
16. Function ________ is used to produce random numbers.
rand
Closing brace
t
linker
17. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
auto
address
recursive
default constructor
18. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
strcmp()
mixed expression
globals
template
19. C++ programs are normally typed into a computer using a(n) ________ program.
editor
loader
Semicolon
main
20. Message displayed to the screen asking user for input; generated with an output statement
data type
prompt
recursive function
function prototype
21. All C++ Variables are_________.
arithmetic expression
cout
case sensitive
delete
22. To write data to a file you define an object of which one of the following
sorting
continue
Sentinel
ofstream
23. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
semantics
beginning
//
Stack overflow
24. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
assignment statement
function scope
token
register
25. The only integer that can be assigned directly to a pointer is_____________.
cmath
n
function prototype
0
26. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
function overloading
Unified Modeling Language(UML)
const
this
27. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
?
static_cast<char>(65)
semantics
left
28. The process of placing the elements of an array in order is called ________ the array.
fixed
>>
special symbols
sorting
29. A sequence of operands and operators that describe a calculation to be performed
preprocessor
arithmetic expression
setw
&
30. Function ________ is used to set the random number seed to randomize a program.
srand
strcmp()
data type
recursive function
31. Used to qualify hidden names so that they can be used.
rand
scope resolution operator
if
reserved words
32. Grammar rules of the language; compiler will try to identify and locate syntax errors
stack
arithmetic expression
syntax
preprocessor
33. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
pointer
t
associations
register
34. The process of determining if an array contains a particular key value is called _________ the array.
>>
searching
derived class
return
35. In inheritance the ____________ is the class the receives the inherited members.
derived class
//
information hiding
escape sequences
36. The ________ program transfers the executable image of a C++ program from disk to memory.
heap
integer operands
overloading
loader
37. In inheritance the ____________ is the class that supplies the inherited members.
strcpy()
base class
globals
prompt
38. A __________ should be used to declare the size of an array because it makes the program more scalable.
two-dimensional
constant variable
mixed expression
escape sequences
39. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
Unified Modeling Language(UML)
globals
inline functions
like-type expression
40. Use 2 characters to represent one
continue
escape sequences
switch
break
41. These are data items whose values do not change while the program is running
cin
void
Sentinel
Literals
42. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
variable
like-type expression
binary operator
private
43. Manipulator that causes the insertion point (cursor) to move to the beginning of the next line
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
44. Type casting syntax
binary operator
/n
opened
static_cast<char>(65)
45. Whole numbers - no decimals and no commas included
return
int values
operator overloading
semantics
46. If a member initializer is not provided for a member object of a class the object's __________ is called.
base
default constructor
rand
Counter-controlled or definite
47. Default name of executable file
beginning
a.out
pointer
preprocessor
48. Nonexecutable statements that are included in a program to provide information about what the program does etc.
cmath
switch
recursive function
comments
49. 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.
assignment statement
#include directive
information hiding
/n
50. An operator that can only be used with int values. result will always be an int.
new line
% modulus
Literals
left