If you don’t have any ticket, you may approach the Train Superintendent/TTE after purchasing an unreserved ticket from the booking office. The TTE will allot the accommodation, subject to availability. You can also try tatkal booking which is open prior to 24 hours before the boarding of train
Passengers with confirmed reservation will be allotted berths at the time of booking and the coach and berth numbers are indicated on the ticket itself, except in case of first class ACC and first class coaches. The compartment/cabin/coupe numbers for first ACC and first class are allotted at the time of chart preparation.