In 5th year (~16 years old) you usually do 5 subjects - not sure if any of these are compulsory (English used to be, but I don't think it is now) - these are examined in your "Highers" (Higher Grades). I did Maths, Chemistry, Physics, English and Engineering Drawing (this was before CS was available, it is now).
Highers are used for University entrance and, in Scotland, depending on your birthday you can get your Highers and be off to University when you are 17. Sixth year at secondary school in Scotland is either used top up your exams if you didn't get enough to do the course you want, doing more advanced courses and/or going to parties...
The downside of this approach is that you specialise very early - basically you choose at 14. Which is great if you know what you want to do and not so good if you don't. This is aggravated by UK Universities traditionally having very focused courses e.g. I did a CS course and all we had was 4 years of Computer Science and Maths classes with some Statistics for light relief. Again this is great if you pick the right course and dreadful if you make a mistake.
[NB I have a 14 year old son and we've just been through the trauma of picking Standard Grade courses]
FYI Here is a exam paper for an Advanced Higher in Computing, which I think is pretty good:
http://www.sqa.org.uk/pastpapers/papers/papers/2012/AH_Compu...