← All topics
Quiz: References and Functions: questions with answers
10 questions, each with the answer and a short explanation.
Take the timed quiz + get a certificate →- Q1. What does this print? (code)
- Q2. Which is true about references?
- Q3. How should a function receive a large vector it only reads?
- Q4. What does this print? (code)
- Q5. Two functions named area(int) and area(int, int) in the same program is an example of:
- Q6. What does this print? (code)
- Q7. Where must default arguments appear in a parameter list?
- Q8. What does this print? (code)
- Q9. Can two overloaded functions differ only in their return type, like int get() and double get()?
- Q10. Why is an inline function safer than a function-like macro such as define SQ(x) xx?