Simulate the train tickets booking system with C on Linux platform.