You may be able to prevent gas, bloating, burping, and hiccups. 1  Avoid foods that cause gas, such as beans, broccoli, cabbage, and bran. The amount of gas that different foods cause varies from person to person. 2  Take steps to avoid swallowing air: Eat slowly. Avoid gulping food or beverages.