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. 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.
Unified Modeling Language(UML)
?
static
member
2. In inheritance the ____________ is the class the receives the inherited members.
ofstream
break
derived class
public
3. A sequence of operands and operators that describe a calculation to be performed
friend
function scope
arithmetic expression
.cpp
4. When it is not known in advance how many times a set of statements will be repeated a _________value can be used to terminate the repetition.
Sentinel
static
definition
information hiding
5. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
stack
floating-point
unary operator
function prototype
6. Characters used to separate symbols or reserved words or identifiers and statements
function call
ofstream
whitespace
if
7. Creates a copy of a string.
strcpy()
srand
&
void pointer
8. Returns the length of a string excluding the null terminator.
#include
strlen()
default constructor
type casting (conversion)
9. Allows the programmer to store a value in a variable
semantics
assignment statement
constant variable
mixed expression
10. __________ can be used to assign an object of a class to another object of the same class.
Default memberwise assignment
heap
constant variable
arithmetic expression
11. The _____ causes the contents of another file to be inserted into a program.
#include directive
object file
void
token
12. To write data to a file you define an object of which one of the following
ofstream
special symbols
floating-point
continue
13. A variable that is known only within the function in which it is defined is called a ________.
//
local variable
token
#include directive
14. The ________ statement in a called function passes the value of an expression back to the calling function.
allocating memory
operand value
strcpy()
return
15. Every C++ program begins execution at the function _________.
main
Arithmetic Operators
two-dimensional
unary scope resolution operator (::)
16. 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.
0
unary operator
information hiding
break
17. Symbol that denotes an action to be performed
derived class
operator
getline
loader
18. A function is invoked with a ________.
function call
#include directive
NULL
operator
19. A memory location with a name and data type - its content may be changed during program execution
variable
syntax
binary operator
public
20. A set of values together with a set of operations
selection
unary scope resolution operator (::)
data type
variables
21. A filestream variable that represents the default input source
private
opened
cin
void
22. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
before
Arithmetic Operators
new line
setw
23. 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.
type casting (conversion)
void
semantics
operator overloading
24. A function ________ enables a single function to be defined to perform a task on many different data types.
fstream
template
showpoint
break
25. A __________ data member represents class-wide information.
searching
semantics
static
Arithmetic Operators
26. A C++ statement that makes a decision is ______.
identifiers
token
object-oriented analysis and design (OOAD)
if
27. directive A statement that starts with a # is called a ____________.
inheritance
Preprocessor
cin
searching
28. Identifier or expression that is part of the calculation to be performed
local variable
operand value
a.out
Closing brace
29. Class members specified as _________ are accessible anywhere an object of the class is in scope.
this
prompt
non-static
public
30. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
like-type expression
Unified Modeling Language(UML)
operator overloading
int values
31. You must have a ___________ for every variable you intend to use in a program
definition
&
new line
*
32. Words that are used for special purposes in a program
dot (.)
reserved words
loader
unary operator
33. 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
34. The process of analyzing and designing a system from an object-oriented point of view is called ________.
like-type expression
data type
int values
object-oriented analysis and design (OOAD)
35. Operator with two operands
binary operator
setw
/n
case sensitive
36. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
strcmp()
semantics
continue
#include directive
37. A function that calls itself
function scope
#include directive
::
recursive function
38. A variable declared outside any block or function is a ________ variable.
case sensitive
global
arithmetic expression
classes
39. Most calculations are normally performed by ______ statements.
assignment
endl (same as 'n')
special symbols
Preprocessor
40. 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
Semicolon
allocating memory
loader
41. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
heap
before
fixed
const
42. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
classes
Arithmetic Operators
auto
function prototype
43. Preprocessor directive syntax
#include <headerfilename>
attributes
floating-point
0
44. An expression in which all operands have the same data type - result will have the same data type as operands
scope
char
like-type expression
showpoint
45. Operator with only one operand
Default memberwise assignment
unary operator
allocating memory
classes
46. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
private
classes
a.out
source file
47. Function ________ is used to set the random number seed to randomize a program.
Semicolon
sorting
auto
srand
48. This manipulator is used to establish a field width for the value immediately following it.
strcpy()
break
setw
source file
49. Executable version of program
subscript (or index)
object file
cin >> variable
const
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.
break
function overloading
base
overloading