Baby boomers are less knowledgeable than young adults about links between poor diet or alcohol and an increased risk of cancer, according to a survey.

The survey, commissioned by the World Cancer Research Fund (WCRF) and carried out by YouGov asked more than 2,000 adults in the UK whether they believed various habits and activities were linked to an increased risk of developing cancer.

The results reveal that many adults remain unaware of how their lifestyle might affect their chance of developing such diseases.

In particular, while 66% of those aged 18-24 correctly thought a poor diet increased cancer risk, only 58% of baby boomers agreed, while for alcohol the figures were 64% and 59% respectively.

The reverse trend was seen when it came to processed meat, with just 48% of 18-24 year olds recognising it as increasing cancer risk, compared with 62% of over 55s. The World Health Organisation has put meats such as bacon, ham and sausages in the same category as smoking when it comes to the level of evidence supporting a link to cancer.

19% of 18-24 years olds think coffee increases cancer risk, compared with just 8% of baby boomers – studies have suggested the drink might actually protect against some cancers.

And while 80% of baby boomers said there was a link between genetics and cancer, and 91% said smoking was a risk factor, only 74% and 82% of 25-34 year olds gave the same respective answers.

Susannah Brown, acting head of research at the WCRF, said the study revealed interesting trends. “The different age groups seem to be aware of different risk factors and it could potentially suggest that the sources they are using get this type of information from could perhaps be influencing them,” she said, adding that one possibility is that young adults might be more likely to glean health information from social media than more traditional news outlets.

Brown added that confusion over coffee might, at least in part, be down to news that a judge in California ruled coffee should bear a cancer warning due to chemicals produced during the roasting process, something experts have rejected. “Ultimately our evidence shows that coffee does not increase the risk of any cancers and it may potentially decrease the risk,” said Brown.

The new survey also showed that perceptions of cancer risks differed by social class, with middle class individuals seemingly more aware of links between cancer and various lifestyle factors: 69% made a link between poor diet and cancer, compared with just 52% of working class people.

“We are aware that socioeconomic status does affect health outcomes, and perhaps it shows that it is from awareness right through to actually what the lifestyle patterns are that could perhaps be influencing that,” said Brown.

Brown added that while there is still work to do to spread the message of which lifestyle factors increase the risk of cancer, the findings also contain good news. “We have demonstrated that there [is] awareness of many of the risk factors for cancer, and most positively these are modifiable risk factors.”

Katie Patrick of Cancer Research UKagreed, but said diets are not down to individual choice alone. “Changing habits we’ve had for a long time can be hard, so while there are changes we can make ourselves, the government has a big part to play in making the healthy choice the easy choice for everyone.”