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 sign you use for references
Unified Modeling Language(UML)
if
identifiers
&
2. An expression in which all operands have the same data type - result will have the same data type as operands
main
like-type expression
type casting (conversion)
address
3. Identifier or expression that is part of the calculation to be performed
source file
operand value
cmath
preprocessor
4. Operator with two operands
pointer
#include <headerfilename>
&
binary operator
5. An operator that can only be used with int values. result will always be an int.
% modulus
rand
function call
0
6. Operator with only one operand
#include
unary operator
strcpy()
globals
7. The modulus operator (%) can be used only with __________.
&
/n
integer operands
polymorphism
8. The sign you use for pointers
opened
variable
*
classes
9. The only integer that can be assigned directly to a pointer is_____________.
type
cmath
0
break
10. An expression that has operands with different data types
strcmp()
identifiers
mixed expression
pointer
11. A __________ should be used to declare the size of an array because it makes the program more scalable.
constant variable
strcpy()
void pointer
base class
12. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
mixed expression
overloading
#include
rand
13. Syntax for named constant declaration
register
const datatype identifier = value
semicolon
left
14. * / % + -
strcpy()
non-static
t
Arithmetic Operators
15. When a value of one data type is implicitly (automatically) changed to another data type
type coercion
% modulus
0
#include directive
16. Default name of executable file
scope resolution operator
break
a.out
assignment statement
17. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
function overloading
int values
friend
recursive
18. The number used to refer to a particular element of an array is called its ________.
subscript (or index)
default constructor
setw
recursive function
19. These are data items whose values do not change while the program is running
heap
virtual functions
Literals
void
20. Header file that contains commonly performed mathematical functions
scope
inline functions
cin
cmath
21. Initializers __________ must be used to initialize constant members of a class.
switch
member
if...else
stack
22. The ________ enables access to a global variable with the same name as a variable in the current scope.
unary scope resolution operator (::)
void pointer
globals
>>
23. data types that refer to numbers with decimals
cmath
% modulus
integer operands
floating-point
24. Repeating a set of instructions a specific number of times is called_________repetition.
derived class
Counter-controlled or definite
token
mixed expression
25. The elements of an array are related by the fact that they have the same name and ___________.
#include <headerfilename>
information hiding
type
Unified Modeling Language(UML)
26. Forces the computer to display decimal point and trailing zeroes
showpoint
special symbols
base
recursive function
27. C++ programs are normally typed into a computer using a(n) ________ program.
editor
#include directive
% modulus
strcpy()
28. The storage-class specifiers are mutable - auto - ________ - extern and static.
register
mixed expression
operator overloading
searching
29. Every C++ program begins execution at the function _________.
char
global
stack
main
30. The ________ of an identifier is the portion of the program in which the identifier can be used.
private
heap
cmath
scope
31. tab
t
cmath
strcpy()
const datatype identifier = value
32. All C++ Variables are_________.
case sensitive
prompt
reserve words
polymorphism
33. Type casting syntax
template
scope
heap
static_cast<char>(65)
34. To write data to a file you define an object of which one of the following
ofstream
scope
inline functions
subscript (or index)
35. The three values that can be used to initialize a pointer are 0 - __________ and an address.
cout
escape sequences
NULL
Semicolon
36. The __________ operator reclaims memory previously allocated by new.
source file
unary scope resolution operator (::)
named constant
delete
37. The stream extraction operator
::
<<
>>
non-static
38. The ________ qualifier is used to declare read-only variables.
Sentinel
const
unary scope resolution operator (::)
recursive
39. A __________ data member represents class-wide information.
srand
function scope
static
variables
40. A member function should be declared static if it does not access __________ class members.
t
binary operator
non-static
pointer
41. The _____ causes the contents of another file to be inserted into a program.
#include directive
unary operator
if
initialized
42. The _________ begins the body of every function and the _________ ends the body of every function.
inheritance
main
{ }
address
43. Associate an identifier with a memory location
binary operator
allocating memory
fstream
reserved words
44. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
left
*
function scope
if...else
45. int namespace include using return examples of ___________
friend
static_cast<char>(65)
reserve words
if...else
46. A human readable file that contains C++ program
function prototype
strcpy()
member
source file
47. The process of determining if an array contains a particular key value is called _________ the array.
assignment
&
searching
new line
48. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
cin.get(ch)
globals
break
template
49. Function ________ is used to produce random numbers.
whitespace
% modulus
showpoint
rand
50. Program components in C++ are called functions and ________.
classes
private
strlen()
const