Got this from a website:
When To Eat
Exercising on a full stomach is not the ideal. Food that remains in your stomach during an event may cause stomach upset, nausea, and cramping. To make sure you have enough energy, yet reduce stomach discomfort, you should allow a meal to fully digest before the start of the event. This generally takes 1 to 4 hours, depending upon what and how much you've eaten. Everyone is a bit different, and you should experiment prior to workouts to determine what works best for you.
If you have an early morning race or workout, it's best to get up early enough to eat your pre-exercise meal. If not, you should try to eat or drink something easily digestible about 20-30 minutes before the event. The closer you are to the time of your event the less you should eat. You can have a liquid meal closer to your event than a solid meal because your stomach digests liquids faster.
What To Eat
Because glucose is the preferred energy source for most exercise, a pre-exercise meal should include foods that are high in carbohydrates and easy to digest. This include foods such as pasta, fruits, breads, energy bars and drinks.
My suggestion is not to eat before you exercise, eat after you have done your exercise. If u have to eat before you exercise then eat something which can be digested easily (Stay away from punjabi food :D ).