C++: final assessment

This covers the whole course. Take it after the last module.

Final quiz

1. What is the type of x in auto x = 'a';?
2. What does static_cast<int>(3.9) give?
3. Which reads a whole line into s?
4. Which is true of default arguments?
5. for (int x : v) x *= 2; What happens to v?
6. const string& s as a parameter means what?
7. What happens with "a" + "b" in C++?
8. vector<int> v(4); what is v[3]?
9. What can a reference not do?
10. Which is the right release for new int?
11. What is the default visibility in a class?
12. map<string,int> m; cout << m["x"]; what is printed, and what is m.size() afterwards?
13. Which order does a default priority_queue give?
14. How is a range described to a standard algorithm?
15. Which is required of T in a template that uses a > b?
16. A destructor runs when?

Practical assessment: Build a marks report

Without using hints, write a program that reads students and their marks from a file and prints a ranked report.

Final project

A contact book: Build a program that adds, searches, deletes and lists contacts from typed commands, and saves them to a file between runs.

How it is evaluated

To complete this course