It's up to the exam centre - most say only those with a medical need (e.g. diabetics) can take food in but anything that is taken in has to be free from packaging.
When I done my GCSEs (9 years ago) we were allowed to take food into longer exams but nothing too wild! A bag of haribo or something not a Nando’s half chicken!