Smokers diagnosed with pneumonia are at an increased risk of lung cancer, according to a recent study.