Friday 10 May 2013

QUIZ ANSWERS 16-20

QUIZ ANSWERS 16-20

16. 
The generic type in a template function
must be T
can be T
cannot be T for functions you create, but may be for C++'s built-in functions
cannot be T
Answer: Option B


17. 
A function that is called automatically each time an object is destroyed is a
Constructor
destructor
Destroyer
terminator
Answer: Option B

18. 
A function can
return a value
perform a task
change value of actual arguments in call by reference
a, b, c above are all true
None of the above
Answer: Option D


19. 
The statement float values[]={3.14, -7.86, 36.96, 4.87};
assigns 36.96 to values[2]
assigns -7.86 to values[2]
gives an error message
assign 14 to values[2]
Answer: Option A


20. 
When the compiler places a copy of a small function's statements directly into a program, the function is said to be _____
Overloaded
mangled
inline
redundant
Answer: Option C