If you were driving just fine but your car suddenly dies as you reach a full stop, it could be caused by a faulty idle air control (IAC). The IAC is responsible for controlling your engine’s idling rotational speed. Over time, dirt may build up inside the IAC and jamming it closed, stalling your car while idling.

Why would my car just shut off while driving?

If the fuel pump is not giving the right amount of fuel, then the engine won't be able to run, and it will shut off. A broken fuel pump or fuel filter can cause your car to shut off while driving due to the incorrect amount of gas going into the engine, with it not being enough to run the car properly.

How long can you drive a car with a bad alternator?

An extremely rough estimation would be around 20 minutes or 13-15 miles, which can be extended if you drive slowly and keep your RPM low. If your battery is low, or you've just jumpstarted, it would be surprising if your car can last longer than 10 minutes or 7-10 miles.

Does the alternator charge the battery while driving?

Your alternator is also responsible for charging your car battery while driving. The alternator works by turning mechanical energy into electrical energy. When your engine is on, it powers a drive belt that rests on a pulley attached to the alternator.

Related Question what would cause a car to die while driving

How To Repair Cylinder Head
How To Fix A Broken Radiator