A person who meets sudden death, as in a car accident or from cardiac arrest, does not have a chance to pray for forgiveness.

A Muslim is always aware of the inevitability of death, realizing that it comes at any moment, without warning. Hence, he always tries to be ready to meet his Lord, should his death come suddenly. You always find good Muslims praying for forgiveness all the time, after every prayer, and in between prayers. This is what the Prophet, peace be upon him, has taught us.

Hence, to a Muslim, there is really no case of death that is unexpected. When you know that your time may be called up at any moment, you will be ready, trying always to do what you can to increase your good deeds, and praying always for forgiveness of any slips.