These bacteria also produce gas, usually as they digest food in the large intestines. Foods most often linked to intestinal gas include: 1  Beans and lentils. 2  Asparagus, broccoli, Brussels sprouts, cabbage, and other vegetables. 3  Fructose, a natural sugar found in artichokes, onions, pears, wheat, and some soft drinks. 4  Lactose, the natural sugar found in milk.