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. int namespace include using return examples of ___________
Counter-controlled or definite
if
function scope
reserve words
2. For a local variable in a function to retain its value between calls to the function it must be declared with the ________ storage-class specifier.
static
polymorphism
two-dimensional
ofstream
3. Function ________ is used to set the random number seed to randomize a program.
const datatype identifier = value
pointer
srand
inline functions
4. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
left
operator overloading
cin.get(ch)
this
5. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
0
if...else
information hiding
globals
6. A constant object must be __________; it cannot be modified after it is created.
allocating memory
static
strcpy()
initialized
7. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
const
srand
showpoint
preprocessor
8. A type of pointer that can point at objects of any data type.
getline
whitespace
left
void pointer
9. The ________ enables access to a global variable with the same name as a variable in the current scope.
srand
named constant
unary scope resolution operator (::)
vectors
10. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
assignment
static_cast<char>(65)
information hiding
register
11. 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.
return
virtual functions
variable
fixed
12. 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.
object file
return
Arithmetic Operators
void
13. C++ programs are normally typed into a computer using a(n) ________ program.
local variable
endl (same as 'n')
editor
semantics
14. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
const datatype identifier = value
semicolon
globals
static
15. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
cout
special symbols
selection
#include
16. Nonexecutable statements that are included in a program to provide information about what the program does etc.
comments
linker
char
/n
17. newline
object-oriented analysis and design (OOAD)
scope
unary operator
n
18. Two slash marks ( // ) indicate __________ of a comment
virtual functions
beginning
scope resolution operator
comments
19. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
0
Literals
vectors
break
20. Used for function calls and local variables
recursive
getline
stack
address
21. A member function should be declared static if it does not access __________ class members.
scope resolution operator
Sentinel
dot (.)
non-static
22. The modulus operator (%) can be used only with __________.
{ }
semantics
integer operands
break
23. Operator with two operands
subscript (or index)
polymorphism
binary operator
new line
24. A filestream variable that represents the default output device
setw
cout
Counter-controlled or definite
sorting
25. Naming convention for C++ programs
editor
.cpp
classes
fixed
26. directive A statement that starts with a # is called a ____________.
attributes
token
return
Preprocessor
27. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
function scope
loader
semicolon
new line
28. Creates a copy of a string.
strcpy()
sorting
unary operator
% modulus
29. 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
assignment statement
type coercion
30. All C++ Variables are_________.
address
case sensitive
cmath
overloading
31. A function is invoked with a ________.
function call
&
function scope
recursive
32. data types that refer to numbers with decimals
floating-point
non-static
const datatype identifier = value
auto
33. The sign you use for pointers
*
classes
Closing brace
% modulus
34. Allows the programmer to store a value in a variable
integer operands
/n
friend
assignment statement
35. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
switch
reserve words
#include directive
void
36. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
semantics
static_cast<char>(65)
#include <headerfilename>
unary scope resolution operator (::)
37. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
#include
new line
operator overloading
auto
38. 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.
break
::
inheritance
editor
39. This is used to mark the end of a complete C++ programming statement.
sorting
editor
polymorphism
Semicolon
40. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
information hiding
cin >> variable
private
mixed expression
41. The process of placing the elements of an array in order is called ________ the array.
sorting
preprocessor
virtual functions
member
42. When a value of one data type is implicitly (automatically) changed to another data type
type coercion
searching
Counter-controlled or definite
classes
43. If a member initializer is not provided for a member object of a class the object's __________ is called.
opened
::
semicolon
default constructor
44. The process of analyzing and designing a system from an object-oriented point of view is called ________.
subscript (or index)
object-oriented analysis and design (OOAD)
fstream
initialized
45. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
selection
a.out
cout
#include directive
46. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
//
semantics
Semicolon
before
47. Associate an identifier with a memory location
mixed expression
type coercion
allocating memory
preprocessor
48. The ________ program transfers the executable image of a C++ program from disk to memory.
auto
initialized
#include
loader
49. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
operator
reserved words
Unified Modeling Language(UML)
{ }
50. This manipulator causes the field to be left-justified with padding spaces printed to the right.
left
classes
named constant
NULL