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. A type of pointer that can point at objects of any data type.
void pointer
unary operator
inline functions
//
2. int namespace include using return examples of ___________
reserve words
*
int values
::
3. The three values that can be used to initialize a pointer are 0 - __________ and an address.
auto
preprocessor
NULL
prompt
4. In inheritance the ____________ is the class that supplies the inherited members.
setw
pointer
base class
reserved words
5. Keyword public is a(n) _________
prompt
access specifier
function scope
global
6. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
opened
main
const
new line
7. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
assignment
comments
delete
switch
8. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
cin
pointer
operator
type casting (conversion)
9. Operator with only one operand
#include directive
a.out
unary operator
static
10. Preprocessor directive syntax
#include <headerfilename>
floating-point
continue
cin
11. 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.
information hiding
non-static
base
delete
12. Compares two strings and returns 0 if they are equal.
classes
strcmp()
public
preprocessor
13. An array that uses two subscripts is referred to as a(n) _________ array.
like-type expression
two-dimensional
static
attributes
14. An expression in which all operands have the same data type - result will have the same data type as operands
private
case sensitive
like-type expression
template
15. The storage-class specifiers are mutable - auto - ________ - extern and static.
searching
editor
register
template
16. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
switch
inheritance
void pointer
char
17. The keyword ________ is used in a function header to indicate that a function does not return a value or to indicate that a function contains no parameters.
reserve words
editor
overloading
void
18. 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
19. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
overloading
object file
const
scope
20. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
polymorphism
unary operator
break
floating-point
21. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
/n
operator overloading
whitespace
stack
22. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
return
operator overloading
Stack overflow
vectors
23. A __________ data member represents class-wide information.
Stack overflow
assignment
Default memberwise assignment
static
24. Default name of executable file
const
if
heap
a.out
25. Operator with two operands
strcpy()
assignment
binary operator
semantics
26. Whole numbers - no decimals and no commas included
Stack overflow
syntax
Semicolon
int values
27. A function that calls itself
void pointer
strcpy()
recursive function
virtual functions
28. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
register
::
preprocessor
getline
29. The process of placing the elements of an array in order is called ________ the array.
sorting
const
polymorphism
initialized
30. A variable that is known only within the function in which it is defined is called a ________.
a.out
local variable
function prototype
public
31. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
semicolon
a.out
access specifier
this
32. A __________ should be used to declare the size of an array because it makes the program more scalable.
constant variable
dot (.)
&
#include <headerfilename>
33. 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
scope resolution operator
prompt
definition
34. A program that finds and attaches to your program the indicated libraries for compilation
overloading
if...else
preprocessor
cmath
35. To write data to a file you define an object of which one of the following
ofstream
two-dimensional
cin >> variable
vectors
36. 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
const datatype identifier = value
like-type expression
base
Closing brace
37. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
inline functions
recursive
if...else
loader
38. An expression that has operands with different data types
ofstream
switch
mixed expression
endl (same as 'n')
39. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
globals
mixed expression
derived class
strlen()
40. The symbol for the binary scope resolution operator
recursive function
reserve words
::
subscript (or index)
41. The process of analyzing and designing a system from an object-oriented point of view is called ________.
object-oriented analysis and design (OOAD)
private
const
template
42. When a value of one data type is implicitly (automatically) changed to another data type
prompt
selection
fixed
type coercion
43. The number used to refer to a particular element of an array is called its ________.
definition
virtual functions
heap
subscript (or index)
44. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
cin.get(ch)
int values
void
return
45. The stream insertion operator
<<
opened
associations
static
46. Message displayed to the screen asking user for input; generated with an output statement
char
#include directive
editor
prompt
47. 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.
continue
derived class
object file
/n
48. The stream extraction operator
>>
0
integer operands
auto
49. Syntax for named constant declaration
Literals
recursive
const datatype identifier = value
stack
50. An operator that can only be used with int values. result will always be an int.
vectors
operator
a.out
% modulus