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 file must be ________ before data can be written to or read from it.
opened
reserve words
classes
inline functions
2. A sequence of operands and operators that describe a calculation to be performed
&
arithmetic expression
allocating memory
//
3. These are data items whose values do not change while the program is running
Literals
type
auto
two-dimensional
4. The storage-class specifiers are mutable - auto - ________ - extern and static.
char
register
vectors
base class
5. Compares two strings and returns 0 if they are equal.
strcmp()
new line
type coercion
token
6. The ________ enables access to a global variable with the same name as a variable in the current scope.
strlen()
derived class
if
unary scope resolution operator (::)
7. A function is invoked with a ________.
function call
getline
static
strcpy()
8. Grammar rules of the language; compiler will try to identify and locate syntax errors
assignment statement
syntax
identifiers
searching
9. An expression that has operands with different data types
recursive function
Semicolon
return
mixed expression
10. Two slash marks ( // ) indicate __________ of a comment
beginning
Preprocessor
constant variable
register
11. The only integer that can be assigned directly to a pointer is_____________.
0
type
classes
pointer
12. This is used to mark the end of a complete C++ programming statement.
operator
data type
dot (.)
Semicolon
13. This manipulator causes the field to be left-justified with padding spaces printed to the right.
left
data type
Counter-controlled or definite
#include <headerfilename>
14. The sign you use for references
linker
base
&
fstream
15. Preprocessor directive syntax
semicolon
return
public
#include <headerfilename>
16. A C++ statement that makes a decision is ______.
if
unary operator
assignment statement
constant variable
17. C++ programs are normally typed into a computer using a(n) ________ program.
friend
floating-point
editor
cout
18. Names of things that are used in a program - can apply to variables & constants and functions
information hiding
function call
two-dimensional
identifiers
19. A type of pointer that can point at objects of any data type.
operator overloading
member
void pointer
like-type expression
20. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
break
function prototype
function scope
register
21. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
overloading
floating-point
globals
continue
22. The three values that can be used to initialize a pointer are 0 - __________ and an address.
non-static
fixed
NULL
main
23. Lists and tables of values can be stored in arrays or __________.
escape sequences
strcmp()
this
vectors
24. Most calculations are normally performed by ______ statements.
syntax
function scope
assignment
function call
25. In inheritance the ____________ is the class the receives the inherited members.
pointer
::
{ }
derived class
26. Used for function calls and local variables
mixed expression
stack
static_cast<char>(65)
static
27. directive A statement that starts with a # is called a ____________.
Preprocessor
integer operands
type coercion
delete
28. All ______ must be declared before they are used.
delete
private
variables
virtual functions
29. The stream extraction operator
delete
&
linker
>>
30. OOD also takes advantage of ________ relationships where new classes of objects are derived by absorbing characteristics of existing classes - then adding unique characteristics of their own.
if
inheritance
#include
unary operator
31. A pointer is a variable that contains as its value the____________ of another variable.
virtual functions
default constructor
special symbols
address
32. Message displayed to the screen asking user for input; generated with an output statement
before
this
prompt
friend
33. The stream insertion operator
&
<<
variable
opened
34. This manipulator is used to establish a field width for the value immediately following it.
definition
return
setw
derived class
35. When you create a ___________________in the base class and then call it using an object the function will know to look in the inherited class for the specifics of that function.
virtual functions
showpoint
named constant
t
36. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
void
preprocessor
recursive
attributes
37. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
static_cast<char>(65)
whitespace
endl (same as 'n')
Stack overflow
38. Function ________ is used to set the random number seed to randomize a program.
srand
function prototype
int values
heap
39. tab
Unified Modeling Language(UML)
t
whitespace
data type
40. 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
41. A variable that holds the address of another variable.
prompt
syntax
pointer
preprocessor
42. Returns the length of a string excluding the null terminator.
<<
strlen()
left
showpoint
43. The sign you use for pointers
const datatype identifier = value
*
template
default constructor
44. Words that are used for special purposes in a program
reserved words
before
<<
0
45. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
#include
information hiding
overloading
type coercion
46. Naming convention for C++ programs
integer operands
void pointer
.cpp
source file
47. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
selection
Literals
return
mixed expression
48. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
virtual functions
attributes
#include
const
49. The ________ qualifier is used to declare read-only variables.
assignment statement
comments
Sentinel
const
50. The symbol for the binary scope resolution operator
vectors
assignment
::
Literals