You did the BEST you could, under the circumstances. You cannot keep beating yourself up over this! You'll have other chances to bring your grade up. This isn't the only exam you'll have ~ you'll be able to bring that grade up with NO problem at all. Next time you're trying to study and there's a lot of "noise" going on at home,.go somewhere else to study!

Even if you have to sit in the car or something -- just go somewhere else.
I'm sure you'll do just fine. You have a great head on your shoulders, and if you're used to getting A's & B's, then you'll have that grade up to at LEAST a B before long! Don't worry.
Hugs, Lee