Hiccups are the result of a spasm in your diaphragm, which is a muscle between your abdomen and chest. Its purpose is to assist with inhaling and exhaling, but sometimes it goes a little haywire and contracts suddenly and powerfully. Then your glottis also contracts and shuts your vocal cords tight, trapping air in your throat. The outcome is a hiccup.
Hiccups are generally passing conditions that last from minutes to hours. Those that last for more than 48 hours are termed persistent, and hiccups that remain longer than a month are called intractable. People with pancreatic cancer can suffer from persistent or intractable hiccups, on top of all their other symptoms. Although they're rare (long-term hiccups affect only around two percent of all cancer patients), persistent hiccups can severely disrupt the lives of cancer patients by making sleeping and eating difficult, and by increasing anxiety and stress. Occasionally, they can be treated with drugs.