is it mandatory to stay in hostel
As per your query ,
There were some rules and regulations of every College and hostel you must to follow them otherwise you have to give penality to break rules and regulations .
you can check out this link to know the rules and regulations:
https://www.careers360.com/question-what-about-the-rules-and-policies-of-the-hostel-regarding-the-outings-and-timings-for-hostel
Hope you understand , in case of any issue you can revert here .
Thank you and all the best :)