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 size & shape & color and weight of an object are considered
type casting (conversion)
attributes
Unified Modeling Language(UML)
initialized
2. tab
scope resolution operator
t
overloading
type
3. A function that calls itself
return
>>
recursive function
operand value
4. The process of placing the elements of an array in order is called ________ the array.
.cpp
sorting
switch
named constant
5. If a member initializer is not provided for a member object of a class the object's __________ is called.
default constructor
strcmp()
semantics
preprocessor
6. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
function overloading
private
switch
unary scope resolution operator (::)
7. A __________ should be used to declare the size of an array because it makes the program more scalable.
arithmetic expression
pointer
searching
constant variable
8. Function ________ is used to set the random number seed to randomize a program.
showpoint
strcpy()
base class
srand
9. Characters used to separate symbols or reserved words or identifiers and statements
semicolon
scope resolution operator
type
whitespace
10. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
{ }
Sentinel
globals
function prototype
11. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
//
pointer
int values
if...else
12. An expression in which all operands have the same data type - result will have the same data type as operands
endl (same as 'n')
pointer
like-type expression
scope resolution operator
13. 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.
static
?
char
continue
14. __________ can be used to assign an object of a class to another object of the same class.
address
prompt
Default memberwise assignment
strcmp()
15. A file must be ________ before data can be written to or read from it.
opened
derived class
switch
assignment statement
16. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
escape sequences
% modulus
token
Unified Modeling Language(UML)
17. A variable that holds the address of another variable.
return
global
pointer
beginning
18. Header file that contains commonly performed mathematical functions
Counter-controlled or definite
initialized
default constructor
cmath
19. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
polymorphism
type casting (conversion)
const
function scope
20. This manipulator causes the field to be left-justified with padding spaces printed to the right.
function overloading
Sentinel
global
left
21. Default name of executable file
char
a.out
pointer
assignment
22. The sign you use for pointers
pointer
non-static
function parameters
*
23. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
% modulus
data type
&
token
24. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
>>
syntax
scope resolution operator
//
25. Most calculations are normally performed by ______ statements.
assignment
classes
semicolon
void
26. In inheritance the ____________ is the class that supplies the inherited members.
base class
void
integer operands
two-dimensional
27. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
base class
pointer
function overloading
reserved words
28. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
recursive
% modulus
a.out
template
29. Keyword public is a(n) _________
classes
friend
access specifier
assignment
30. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
0
assignment
friend
setw
31. The modulus operator (%) can be used only with __________.
reserve words
integer operands
rand
preprocessor
32. Operator with two operands
&
binary operator
derived class
data type
33. * / % + -
&
local variable
prompt
Arithmetic Operators
34. You must have a ___________ for every variable you intend to use in a program
semicolon
n
definition
two-dimensional
35. Operator with only one operand
function parameters
inheritance
t
unary operator
36. A constant object must be __________; it cannot be modified after it is created.
initialized
cin.get(ch)
void
polymorphism
37. 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.
strcmp()
friend
mixed expression
information hiding
38. Class members specified as _________ are accessible anywhere an object of the class is in scope.
static
integer operands
rand
public
39. The ________ of an identifier is the portion of the program in which the identifier can be used.
return
if
ofstream
scope
40. Syntax for named constant declaration
const datatype identifier = value
selection
0
linker
41. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
inline functions
escape sequences
Semicolon
prompt
42. Two slash marks ( // ) indicate __________ of a comment
linker
beginning
assignment
static
43. The escape sequence ___ when output with cout and the stream insertion operator - causes the cursor to position to the beginning of the next line on the screen.
/n
recursive function
object file
cin.get(ch)
44. The only integer that can be assigned directly to a pointer is_____________.
function call
0
variables
assignment
45. A human readable file that contains C++ program
beginning
stack
source file
type coercion
46. Associate an identifier with a memory location
allocating memory
% modulus
address
like-type expression
47. Words that are used for special purposes in a program
a.out
reserved words
function call
definition
48. A filestream variable that represents the default input source
cin
object-oriented analysis and design (OOAD)
selection
getline
49. Type casting syntax
strlen()
dot (.)
?
static_cast<char>(65)
50. Identifier or expression that is part of the calculation to be performed
Unified Modeling Language(UML)
private
this
operand value