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. To write data to a file you define an object of which one of the following
void pointer
#include directive
//
ofstream
2. int namespace include using return examples of ___________
% modulus
&
reserve words
static
3. A filestream variable that represents the default input source
address
//
type
cin
4. An expression in which all operands have the same data type - result will have the same data type as operands
mixed expression
like-type expression
preprocessor
base class
5. Preprocessor directive syntax
static
token
#include <headerfilename>
pointer
6. The ________ program transfers the executable image of a C++ program from disk to memory.
loader
attributes
source file
heap
7. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
Stack overflow
variable
dot (.)
if
8. Symbol that denotes an action to be performed
pointer
operator
comments
?
9. To explicitly indicate that a value is to be converted to another type
loader
type casting (conversion)
information hiding
classes
10. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
function scope
semicolon
overloading
showpoint
11. The _________ begins the body of every function and the _________ ends the body of every function.
type
Semicolon
{ }
non-static
12. 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
associations
base
cout
register
13. Message displayed to the screen asking user for input; generated with an output statement
#include directive
continue
prompt
preprocessor
14. Lists and tables of values can be stored in arrays or __________.
strcpy()
#include <headerfilename>
vectors
0
15. The conditional operator. it evaluates a line of code and returns one thing if the condition is true and a different thing if the condition is false.
before
inline functions
?
if...else
16. A file must be ________ before data can be written to or read from it.
::
operator
opened
operator overloading
17. The sign you use for references
char
&
delete
member
18. A pointer is a variable that contains as its value the____________ of another variable.
arithmetic expression
if...else
address
comments
19. Function ________ is used to produce random numbers.
/n
editor
rand
function parameters
20. This manipulator causes the field to be left-justified with padding spaces printed to the right.
data type
const datatype identifier = value
::
left
21. A __________ data member represents class-wide information.
#include <headerfilename>
static
Default memberwise assignment
const
22. The number used to refer to a particular element of an array is called its ________.
classes
subscript (or index)
unary operator
arithmetic expression
23. 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
24. Used to qualify hidden names so that they can be used.
scope resolution operator
//
#include
comments
25. The idea that you can call the same function and the output will depend on the type of object you're using.
delete
integer operands
type
polymorphism
26. A variable declared outside any block or function is a ________ variable.
global
binary operator
comments
recursive function
27. Operator with two operands
cin >> variable
n
binary operator
pointer
28. A type of pointer that can point at objects of any data type.
Preprocessor
opened
void pointer
#include
29. A function is invoked with a ________.
::
function call
left
stack
30. A variable that is known only within the function in which it is defined is called a ________.
local variable
.cpp
syntax
pointer
31. The stream insertion operator
base class
polymorphism
<<
srand
32. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
scope resolution operator
friend
editor
&
33. A function ________ enables a single function to be defined to perform a task on many different data types.
like-type expression
template
derived class
two-dimensional
34. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
function prototype
base
cmath
cout
35. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
source file
char
semantics
register
36. All ______ must be declared before they are used.
comments
showpoint
variables
loader
37. Characters used to separate symbols or reserved words or identifiers and statements
template
unary scope resolution operator (::)
whitespace
Counter-controlled or definite
38. When a value of one data type is implicitly (automatically) changed to another data type
int values
static
type coercion
% modulus
39. Most calculations are normally performed by ______ statements.
?
vectors
assignment
operator overloading
40. Class members specified as _________ are accessible anywhere an object of the class is in scope.
opened
preprocessor
public
int values
41. Sets floating-point values to a fixed decimal format
inline functions
function parameters
two-dimensional
fixed
42. A constant object must be __________; it cannot be modified after it is created.
initialized
% modulus
t
variable
43. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
private
% modulus
//
const
44. A filestream variable that represents the default output device
selection
cout
int values
main
45. Classes can have relationships with other classes. These relationships are called ________.
associations
dot (.)
&
operator
46. 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.
semantics
two-dimensional
switch
void
47. Two slash marks ( // ) indicate __________ of a comment
friend
preprocessor
beginning
endl (same as 'n')
48. The ________ of an identifier is the portion of the program in which the identifier can be used.
sorting
reserve words
scope
cin
49. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
inline functions
member
register
*
50. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
definition
break
dot (.)
named constant