I'm so sorry to hear :/ Never easy.
This is hard to advise as we do not know your entire situation (will this delay your graduation? What is left on record? Etc).
Personally, I did poorly on 1 course and re-took it in order to keep my 4.0 major GPA. It was worth it.
If you can re-take the C course, are confident you can get an A, and it won't set back your graduation, it would likely be worth it.
I'm not so sure it's worth it for Bs.
That said, master's grades are less important than undergrad, but it also does depend on your other work experience (as in, the grades matter more if you only have your undergrad and went straight to masters. They matter less if you worked for multiple years between the 2 degrees with relevant work experience + promotions)
Please don't take the above as advice on what you should do. There are many other factors at play that I don't have enough info on without speaking to you directly.
Highly recommend you also talk to your career center for more tailored advice here!
(editiert)