I know this thread is pretty old but with something like IBS I want to help anyone that needs help, I am currently in my last year of a levels and I am in the period of my last term before going on study leave for exams. I've pretty much had it since summer of 2016 where it started of as minor bloating but progressively got worse towards my winter mock exams in December 2016/ January 2017, I went to the doctor in January and was told I have IBS symptoms most likely due to stress which is common at my age (17, I turn 18 in exactly two weeks time).
I've tried a few medications from boots that haven't helped. As you know there isn't a cure for IBS and it is hard to get it under control, I've literally had to get prescription medication for my IBS (it works better than what is sold in boots but it isn't a cure) I still struggle with mine on a day to day basis (mine isn't food related as any food seems to set off my bloating) but do not be embarrassed to tell those around you and your teachers/ employees. I've let my close friends know and they totally understand and didn't think it was disgusting (you can't exactly help the way your gut behaves with IBS), i've let my subject teachers know so they understand the reasons why my attendance is lower and will not penalise me for it, I've also made exam arrangements to do mine in a separate room from everyone else with access to a toilet. I make sure to sit by myself close to an open window not too close to people in case I get a flare up (I get the weird stomach gurgling noises or flatulence often).
I suggest everyone going through IBS during exams does the same, I felt embarrassed to tell people but once you do most people will understand and be accepting (if those close to you truly care then the fact you have IBS should not change their opinion of you) (also willing to help and advice you to make your exam experience more comfortable). If you cannot find medication in store I suggest asking your doctor for prescription medication, I take mebeverine (also drink peppermint tea and take peppermint oil capsules). I still suffer from bloating daily (specifically after eating or when I go a while without eating) but it has help work better than other medication, I still sometimes restrict myself from going out especially if I know eating is involved, going to someones house or in quiet areas but try having a positive mindset and not always thinking about having a flare up. Try different remedies that may help with your symptoms, try to see if any foods trigger your IBS or may cause a flare up and let people know so you can make arrangements that can make your exam experience better and less stressful, try not to stress out and have a positive mindset.