Dementia is caused by a range of factors, including genetics, age and pollution.
What you eat can also have an impact on how likely the illness is to appear.
Research showed some of the most popular foods could increase the chances of dementia.
Those who regularly eat burgers, chips, fried food, pizza and sugar could be at risk.
People were warned against regularly eating processed foods
The study was authored by Huiping Li of Tianjin Medical University in China.
It found that the risk of dementia increased by 25 per cent for every 10 per cent increase in processed foods consumed.
The study researched 72,083 people over the age of 55 who had no forms of dementia.
They were asked to complete a daily questionnaire about what they were eating and drinking.
Participants were tracked for an average of 10 years with more than 500 of them being diagnosed with forms of dementia during that time.
Those who showed the illness also ate the most highly processed foods, with around a quarter of their diet accounting for this.
Swapping 10 per cent of ultra-processed foods with healthier snacks, like fruits, vegetables, nuts and meat, leads to a 19 per cent lower risk of dementia, the research found.
Huiping Li stated: “Our results also show increasing unprocessed or minimally processed foods by only 50 grams a day, which is equivalent to half an apple, a serving of corn, or a bowl of bran cereal, and simultaneously decreasing ultra-processed foods by 50 grams a day, equivalent to a chocolate bar or a serving of fish sticks, is associated with three per cent decreased risk of dementia.