So he gave you an F on the test. No, that won’t appear on a transcript. It would only show up if you received disciplinary action like probation or dismissal. If you end the class with a C, then just forget it and keep the phone in your backpack for next time. It doesn’t sound like you were accused of actually cheating. You just broke a rule about a cell phone in your pocket because you just forgot about it. That’s not academic dishonesty. I’ve done that too, but didn’t even realize it until the test was over. We’re humans and we forget sometimes. Don’t give it a second thought. If the question comes up on a college application, answer “no” because you weren’t cheating.