Quick anecdote: as an undergraduate I got a C in one of my technical electives. I loved the class but bombed the test. After discussing the final with them, he did eventually offer to give me a B though (which was great because I didn’t even go to talk to him with that in mind). Long story short, I figured out where I messed up in that class and eventually went on to get a PhD in a field that is heavily-reliant on that class. Getting a C is not a killer. Making a habit out of getting many Cs can be.