I'm currently a sophmore in college and i've been suffering from this problem for about 2yrs now. I feel your pain in class/exams. Last year during finals, I had it so bad that I guessed on every single question and didn't bother to write the 2 essays. I simply walked in...Circled and left. By some miracle though, I ended up only missing 5 questions out of 70?!

no joke. I suppose the cosmos have a way of evening out themselves sometimes hehe.
I've found a few ways that help:
one thing I have found that works is to eat very little 20-30minutes prior to being in a quiet situation. (ex. Candy bar/few bites of sandwich) just enough to keep your stomach satisfied for a while.
Also, burping a lot (not loud, but simply making yourself do it)
keep yourself occupied (open backpack, doodle etc.)
don't think i'm crazy, but sometimes if my stomach is just being rude and obnoxious in class...I find it helps if you pinch yourself haha I guess the pain overcomes the stomach.
If your stomach is making noises I recommend moving about in your seat, readjusting yourself (the noise of your moving in your seat will drown out the sound)
==========================================
=====
i want you all to know that this is simply a flaw that we have. Think about it, your life is probably better than a lot of people you know. Nobody is perfect. In the end, it all evens out. We can get through it together.
I'm going to try meditation soon (drastic? Hah) to see if it helps.
I'll keepp you posted