It is not compulsory as Institutes doesn't enforce anyone to stay in the Hostel.
If you can afford then you can live outside as a Day Scholar's or if you live nearby the college then you can opt for living in home.
But i would suggest you to take the Hostel for 2 years atleast, if you don't live nearby as it will help you to grow and you will meet various Students with same tangent.
Regular exam updates, QnA, Predictors, College Applications & E-books now on your Mobile