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.
two-dimensional
pointer
opened
Counter-controlled or definite
2. Symbol that denotes an action to be performed
return
operator
preprocessor
variable
3. A human readable file that contains C++ program
const
unary operator
source file
pointer
4. The ________ statement in a called function passes the value of an expression back to the calling function.
virtual functions
ofstream
const
return
5. Preprocessor directive syntax
unary scope resolution operator (::)
binary operator
access specifier
#include <headerfilename>
6. A constant object must be __________; it cannot be modified after it is created.
rand
>>
initialized
delete
7. Classes can have relationships with other classes. These relationships are called ________.
return
associations
assignment
friend
8. These are data items whose values do not change while the program is running
Literals
address
classes
syntax
9. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
semicolon
new line
ofstream
classes
10. The storage-class specifiers are mutable - auto - ________ - extern and static.
register
void pointer
subscript (or index)
global
11. Sets floating-point values to a fixed decimal format
fixed
main
operator overloading
like-type expression
12. In inheritance the ____________ is the class the receives the inherited members.
const
static
identifiers
derived class
13. A set of values together with a set of operations
allocating memory
template
variable
data type
14. The sign you use for references
sorting
syntax
member
&
15. Member objects are constructed __________ their enclosing class object.
reserve words
before
register
global
16. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
vectors
data type
friend
operator
17. Grammar rules of the language; compiler will try to identify and locate syntax errors
register
#include <headerfilename>
opened
syntax
18. Keyword public is a(n) _________
#include
object file
access specifier
const datatype identifier = value
19. The ________ program transfers the executable image of a C++ program from disk to memory.
const
endl (same as 'n')
{ }
loader
20. A variable that is known only within the function in which it is defined is called a ________.
//
function scope
overloading
local variable
21. A filestream variable that represents the default output device
cout
type coercion
Stack overflow
void pointer
22. In inheritance the ____________ is the class that supplies the inherited members.
fixed
operator
opened
base class
23. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
return
static
editor
Preprocessor
24. int namespace include using return examples of ___________
reserve words
loader
cin.get(ch)
escape sequences
25. The ________ of an identifier is the portion of the program in which the identifier can be used.
scope
global
static
new line
26. To write data to a file you define an object of which one of the following
ofstream
template
Preprocessor
before
27. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
subscript (or index)
Arithmetic Operators
arithmetic expression
if...else
28. The process of placing the elements of an array in order is called ________ the array.
?
assignment
classes
sorting
29. Returns the length of a string excluding the null terminator.
Arithmetic Operators
type
strlen()
named constant
30. Repeating a set of instructions a specific number of times is called_________repetition.
binary operator
named constant
Counter-controlled or definite
information hiding
31. A function is invoked with a ________.
recursive
type coercion
char
function call
32. The modulus operator (%) can be used only with __________.
integer operands
void pointer
strlen()
Semicolon
33. The _____ causes the contents of another file to be inserted into a program.
#include directive
attributes
assignment
return
34. Most calculations are normally performed by ______ statements.
assignment
<<
public
srand
35. __________ can be used to assign an object of a class to another object of the same class.
default constructor
#include <headerfilename>
?
Default memberwise assignment
36. If a member initializer is not provided for a member object of a class the object's __________ is called.
associations
reserved words
int values
default constructor
37. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
operator overloading
% modulus
assignment
const datatype identifier = value
38. Type casting syntax
type casting (conversion)
non-static
static_cast<char>(65)
overloading
39. A function that can be used to read character data including whitespace
cin.get(ch)
switch
NULL
prompt
40. Two slash marks ( // ) indicate __________ of a comment
static
beginning
void pointer
>>
41. A __________ data member represents class-wide information.
continue
void
editor
static
42. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
before
function prototype
&
base class
43. All C++ Variables are_________.
case sensitive
default constructor
static_cast<char>(65)
ofstream
44. You must have a ___________ for every variable you intend to use in a program
register
if
definition
named constant
45. Program components in C++ are called functions and ________.
return
classes
cmath
dot (.)
46. Default name of executable file
named constant
dot (.)
a.out
Literals
47. Class members are accessed via the ________ operator in conjunction with the name of an object (or reference to an object) of the class or via the arrow (->) operator in conjunction with a pointer to an object of the class.
semantics
scope
dot (.)
break
48. C++ programs are normally typed into a computer using a(n) ________ program.
assignment statement
editor
attributes
escape sequences
49. Associate an identifier with a memory location
identifiers
allocating memory
*
virtual functions
50. The process of determining if an array contains a particular key value is called _________ the array.
/n
searching
Literals
mixed expression