Plenty of food is available during the journey. Trains have dining cars and the carriage attendants will often provide cold drinks, snacks and even freeze-dried meals available for sale. Food on the train is not included in ticket prices.
Food and drinks are also sold in kiosks at the platforms. And there are always people on the platform that offer a variety of food (eggs, fish, cheese, bread, fruits and snacks) and drinks for passengers.
To get a reasonable price, wait for a station with a 20-30 minutes stop, and just exit the train station, there is usually a plenty of kiosks or small shops outside, offering a wider choice. Some of the larger stations will have food marts with snacks and alcohol.
It’s also possible to eat quite cheap during the trip. Since there is an electric drinking water heater in every carriage, one of your best choices is to have some instant noodles and cafe. Just bring your own cup.
In every carriage there is a drinking water heater with boiling water available (bring your own tea). Carriage attendants also sell tea and coffee, and it's usually possible to buy soft drinks and beer in the dining carriage to bring back to your carriage.