I want to write university exam
First, your question is not clear.
It would be better if you specify the university you want to get in. Every university have different admission criteria. Some go with entrance where, some with marks of 12th. Central Universitues have their entrance tests while other state Universities have their own criteria. Technicaly,
You can obviously write University exam. You should pass 12th first. Then you can get into an university. Apply and write the exam.