In your case of A - B - C, you can travel in the same class provided a seat is available. Because as you are not reserved passenger from B onwards, someone else might have bookd the seat from B onwards. You can talk to TTE and get the seat if available. If you dont get a seat, all depends on mutual arrangement. I have seen such passengers traveling by standing at door or requesting others and accomodating themselves.