Foods that contain carbohydrates along with fructose, lactose, starch and insoluble fiber are the ones that give you more gas. Foods like broccoli, cabbage, whole grains, onion, pears and drinks like beer, soda and other carbonated beverages are the most common gas-producing foods and drinks. Avoid these to make sure you don't get too much gas accumulated in your system.