The grading policy depends on the teacher.
I know a student who was able to turn in some late assignments for 50% credit which allowed them to pass the class.
Each UC has policies about notification of D it F. For example. UCSC
“If you have already earned a grade of D or F (or equivalent for other grading systems) in your senior year (fall or spring), or if your overall GPA in your senior year (fall or spring) is a grade point below your previous academic performance, you have not met this condition of your admission. Immediately notify Undergraduate Admissions of any D or F grades as instructed below. Doing so may allow UA the discretion to provide you with options (if appropriate) to maintain your admission.”