There are many reasons why people have a cough. Most new coughs are related to an irritation in the lung such as viral infection or bacterial infection. These coughs usually improve and then completely disappear once the infection has gone away. Some people have coughs that are persistent over months or years, and these are usually related to such things as acid reflux (heartburn), irritation from smoking, asthma, chronic lung damage, exposure to irritants in the surrounding environment, or other problems unrelated to the lungs themselves. Many lung cancer patients have no cough at all. However, a cough may, at times, be a sign of lung cancer. Lung cancers may irritate the lungs or windpipe, stimulating a cough. Whether a cough is dry or produces mucus is not related to whether a lung cancer is present. For some people who develop lung cancer, a dry cough may appear; in other people who develop lung cancer a cough that has been bothersome for months or years may change in character, becoming harsher or more nagging. Some people cough up mucus, other people cough up blood, and most people who have a cough related to lung cancer don't cough up anything at all.
More Answers from The Society of Thoracic Surgeons