The UCs and Cal States will tell you exactly what you must get in term of grades, as ucbalumnus stated. The way it normally works is that your GPA must remain above a certain level (for example, a 3.0), and you can’t get any Ds or Fs. This will vary a bit by college, and they will tell you when they admit you.
So the class you really need to work on is physics, so that grade doesn’t go any lower.