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. To explicitly indicate that a value is to be converted to another type
type casting (conversion)
semantics
void pointer
case sensitive
2. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
n
preprocessor
Literals
inline functions
3. Causes the program to immediately goes back to the top of the loop. the remainder of the statements in the loop are ignored for this current iteration.
&
auto
like-type expression
continue
4. 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
Preprocessor
linker
variable
5. Identifier or expression that is part of the calculation to be performed
pointer
type casting (conversion)
operand value
static
6. Member objects are constructed __________ their enclosing class object.
beginning
base class
identifiers
before
7. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
auto
function prototype
before
left
8. Returns the length of a string excluding the null terminator.
object file
public
variable
strlen()
9. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
base
continue
getline
strcmp()
10. 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.
vectors
void
preprocessor
Sentinel
11. Operator with only one operand
Closing brace
unary operator
rand
Stack overflow
12. newline
t
n
template
void pointer
13. An array that uses two subscripts is referred to as a(n) _________ array.
static
strcpy()
fstream
two-dimensional
14. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
globals
*
function parameters
showpoint
15. Message displayed to the screen asking user for input; generated with an output statement
prompt
two-dimensional
source file
non-static
16. data types that refer to numbers with decimals
showpoint
pointer
beginning
floating-point
17. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
this
function overloading
reserved words
*
18. You must have a ___________ for every variable you intend to use in a program
cmath
definition
scope
break
19. This is used to mark the end of a complete C++ programming statement.
Semicolon
like-type expression
function overloading
function call
20. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
switch
dot (.)
recursive
a.out
21. Sets floating-point values to a fixed decimal format
arithmetic expression
break
fixed
const
22. The process of placing the elements of an array in order is called ________ the array.
globals
sorting
base
function overloading
23. Classes can have relationships with other classes. These relationships are called ________.
cout
associations
rand
Sentinel
24. Every C++ program begins execution at the function _________.
cout
main
register
globals
25. In inheritance the ____________ is the class that supplies the inherited members.
Arithmetic Operators
base class
polymorphism
left
26. __________ can be used to assign an object of a class to another object of the same class.
loader
Default memberwise assignment
case sensitive
whitespace
27. C++ programs are normally typed into a computer using a(n) ________ program.
syntax
Counter-controlled or definite
Default memberwise assignment
editor
28. Naming convention for C++ programs
identifiers
.cpp
operator overloading
function parameters
29. Forces the computer to display decimal point and trailing zeroes
pointer
reserve words
non-static
showpoint
30. The __________ operator reclaims memory previously allocated by new.
return
delete
assignment
allocating memory
31. The three values that can be used to initialize a pointer are 0 - __________ and an address.
editor
delete
NULL
Semicolon
32. 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.
opened
?
delete
static
33. An expression in which all operands have the same data type - result will have the same data type as operands
operator
operand value
<<
like-type expression
34. If a member initializer is not provided for a member object of a class the object's __________ is called.
default constructor
//
void
n
35. Type casting syntax
n
static_cast<char>(65)
function scope
virtual functions
36. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
identifiers
const
unary scope resolution operator (::)
switch
37. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
cin >> variable
comments
break
classes
38. A ________ program executes before the compiler's translation phase begins.
ofstream
preprocessor
void
recursive
39. Function ________ is used to produce random numbers.
cin >> variable
virtual functions
rand
function parameters
40. The modulus operator (%) can be used only with __________.
opened
integer operands
rand
cin >> variable
41. Symbol that denotes an action to be performed
operator
Counter-controlled or definite
strlen()
information hiding
42. A recursive function typically has two components: One that provides a means for the recursion to terminate by testing for a(n) ________ case and one that expresses the problem as a recursive call for a slightly simpler problem than the original call
base
polymorphism
scope resolution operator
recursive
43. The storage-class specifiers are mutable - auto - ________ - extern and static.
register
getline
{ }
binary operator
44. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
getline
allocating memory
char
t
45. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
opened
auto
srand
/n
46. This manipulator is used to establish a field width for the value immediately following it.
named constant
floating-point
setw
virtual functions
47. Executable version of program
object file
information hiding
fstream
auto
48. The symbol for the binary scope resolution operator
::
case sensitive
break
#include directive
49. When a value of one data type is implicitly (automatically) changed to another data type
Sentinel
like-type expression
type coercion
object-oriented analysis and design (OOAD)
50. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
named constant
continue
static
escape sequences