Gas and bloating are frequently related to the malabsorption and maldigestion of simple and complex carbohydrates and dietary fibers (25). This can include dairy products, whole grains, onions, garlic, bananas, brussel sprouts, and carrots.