Interesting. My experience was in the US, and I would have kept that 0 unless my professor was feeling _very_ generous. I don't think it would be completely unheard of to have a professor with a policy like you described, but I never ran into it.
We wouldn't have been forced to drop out (at least not due to that exam in isolation), but the 0 would have been considered as part of our final grade for the course.
My experience is that the exam is at the end of the course, so the 0 would be your grade for the course. And you can't finish your degree without passing grades on every course in the degree, so if there were no second chances then that would mean the end of your study.
At my university the year was divided into three trimesters with exam periods at the end, and a fourth exam period at the end of summer holiday. Each exam period would have the exams of all the courses of the previous trimester and also exams of courses of the trimester before for people who still needed to pass that course. If you fail the exam twice, you have to try again when the exam is given again next year (or try to argue with the prof to get special arrangements, say if it's the only one you still need for your degree).
What's the alternative, be forced to drop out of university once you fail an exam?