A fly in an accelerating car A fly is flying around in a car, the fly never touches any surface in the car only fly’s around in the air inside the car. The car accelerates. does the fly slam in to the rear window. or does the fly continue to fly uninterrupted?
 A: First assumption: the air in the car does not mix as a result of the acceleration, and it remains approximately stagnant.  This holds up to scrutiny particularly if the density is taken to be relatively constant - that means that convective currents due to the unbalanced thermal stratification are functionally negligible.
"smart" versus "dumb" fliers: I think the fly is complicating the problem a great deal because we tend to think of the fly as an agile flier.  I read the question to imply a "dumb" flier.  This would be better phrased about a RC helicopter.  As anyone novice pilot knows, these are not smart at all.  The ability to coherently respond to a change in environment is functionally absent for most consumers.  This assumption is much more useful for the problem.
Now, let's just think about the force between the air and the flier.  Obviously, the change in car acceleration doesn't change this.  It can't.  The force on helicopter airfoils is a function of the air movement (unaffected by acceleration) and the movement of the airfoils.  Clearly the lift force initially remains the same, which results in initial acceleration of the helicopter relative to the car, or no acceleration relative to the Earth.
This seems unintuitive, and that's because it's wrong beyond a certain point.  My previous paragraph is only valid for $t=0^{+}$.  That is, when the velocity of the RC helicopter is small relative to the air.  When the car actually picks up speed, the lift changes.  Like I said, the force between the air and the flier can be determined by the relative motion of the airfoils and the air around it.  Changing the velocity changes this.  This means that the lift force will probably increase and change direction somewhat.  However, it won't increase enough and the helicopter will crash.
This would be a good experiment.  Get in a car and try to fly a RC helicopter.  Get it hovering very stably, then accelerate.  My prediction is very clearly that it crashes.  The fly would have to be a better flier than the RC helicopter to avoid hitting the wall.  That's outside of the scope of what we could possibly hope to answer.
A: The fly does not slam into the windshield because at smaller scales of size, air effectively becomes much more viscous and halts its motion. A fly using a jet pack in a vacuum-filled car would slam into the windshield, however.
Viscosity is a fascinating issue in terms of scale. Paramecia, for example, effectively must drill their way through water, not swim. Another example I find even more surprising is the number of bacteria and viruses living in clouds, which because of their tiny size can stay aloft almost indefinitely. The relatively minute downward pull of gravity is just not enough to pull them out of the air, especially with so many air currents mixing them up.
The more precise way to say all this is that as the average radius $r$ of an object shrinks, its surface area shrinks more slowly than its volume (mass). For example, the surface area of a ball is $A=4{\pi}r^2$, while the volume of a ball is $V=\frac{4}{3}{\pi}r^3$. That means that the ratio of surface area to volume for a ball is $\frac{3}{r}$. That starts getting huge in a hurry when $r$ shrinks to the size of, say, a microbe. If you think of objects of that size as having enormous weightless parachutes attached to them, representing their higher surface areas per gram, you can see the problem.
The fly is actually a somewhat intermediate case, I should note. By actual observation, a small fly definitely does not hit the front or back of a car in response to braking or acceleration. If you instead had a horse fly... I'm not so sure. I could easily see the significantly higher mass-to-surface of a horse fly causing it to move under acceleration of a car. And if for some very strange reason you just happened to end up with this little fellow flying around in your car -- and managed to stay on the road at the same time -- it would without much doubt slam into the front windshield as you wisely braked as hard as you could.

Another addition: The full answer to this one is remarkably complex. I thought I had it worked out using a derivation of Stoke's Law borrowed mostly from the last slide on page 2 of this dust-settling analysis by Dr Jerry Tien at Missouri University of Science and Technology (my alma mater by coincidence). Alas, when I worked out his particle Reynolds number threshold value (something odd there), I realized his version may be limited to dust-sized particles. Still, his equations starkly demonstrate just how complicated this problem gets if you start trying to solve it accurately.
Bottom line: This is a question for which there is no simple "yes" or "no". Instead, it involves a continuous function in which the motion of the flying insect depends both on how small the insect is and on how hard you hit the brakes (or accelerate). There would be almost no motion for very small insects such as gnats, while large insects really could end up hitting the windshield.
I've added a "fluid dynamics" flag, so I'm hoping one of you folks can enlighten all of us on whether someone has gone through the math to get the function for this. Dr Tien's work (referenced) is likely a good starting point for anyone really interested.
A: There is a subtle point that needs to be taken into account here, as I believe the question is a very interesting one, and relates to the way space-time becomes warped under acceleration.  Let us assume for the moment that we are not taking into account air resistance, and air viscosity, which are the obvious parameters in the problem, and they may sideline the subtleties of the relativistic effects. They are valid points, but just to give the problem a slight twist, if you don’t mind.
Let us put a fly in a car which we can control from the outside – we are safe from the effects of high acceleration – and we accelerate the car at rate g or 4g and even higher. Let us also imagine that we ‘made an agreement’ with the fly that she will not try to boost her position from the hovering mode at the front end of the car, to try to prevent the consequences of our plan – this is our secret! 
As the car begins to accelerate at 4g say, the car becomes an accelerated reference frame and, according to the principle of equivalence, there will be a strong gravitational field acting towards the rear of the car.  The air inside the car will become compressed with the highest pressure toward the rear of the car.  Even if the fly tries to keep her promise she made, she will find it difficult to do so because of the air pressure being so low at the front. I think the fly will hit the back screen like a bullet, as she will be falling in the strong equivalent gravitational field due to the acceleration. Possible error in reasoning?
A: A very good experiment tells us, what will happen to a pendulum hanged in  and a helium filled balloon kept inside an accelerating car?. The pendulum will bend in the opposite direction but balloon will bend in the direction of acceleration of car. So this shows the relative density does matters. Now if the fly is flying and say the car is accelerating along positive x axis, then air pressure will be greater on backside than front, so the fly will move forward. 
A: The short, non-mathematical answer; if you assume the fly's density is larger than air's, the fly will move backwards as intuition suggests.
The long, mathematical answer; we can use a simplified fluid-mechanical model of a vehicle filled with fluid to show that the direction of motion of any small object suspended in a car, relative to the car, is strictly a function of the density of air $\rho_a$ and of the fly/object $\rho_f$.
Consider a cylinder filled with air (the car), with a uniform velocity $\vec{v} = \vec{0}$ but with a uniform nonzero acceleration $\frac{d\vec{v}}{dt} = \lambda \hat{i}$ relative to a fixed observer outside of the car. (The $\hat{i}$ vector indicates the direction of motion/acceleration of the car without loss of generality).
We could consider using the full Navier-Stokes equation to understand the mechanics of the air in the car:
$$\frac{\partial \rho_a \vec{v}}{\partial t} + \nabla \cdot (\rho_a \vec{v} \otimes \vec{v}) = -\nabla p + \mu_a\nabla^2\vec{v}$$
where $p$ and $\mu_a$ are the pressure and viscosity of the air, respectively.
If we take air to be incompressible (which is sensible for usual car accelerations) and note the velocity of the air in this instant is zero everywhere, the equation simplifies into the following form:
$$\rho_a\frac{\partial \vec{v}}{\partial t}  = -\nabla p = \rho_a\lambda\hat{i}$$
This is indicating that the pressure of the air in the car as it accelerates increases linearly from front to back!
This is the exact same physical scenario, rotated 90 degrees, that you'd see in a column of water; the pressure increases linearly as you go down through the column. Therefore, the force that is exerted by the uneven pressure field in the air on the fly has the exact same form as a buoyancy force!
In short, and skipping the derivation (you can see one for the up-down case here), you'd find that the force $\vec{F}_b$ that is exerted on the fly with volume $V_f$ by the pressure $p$ of the fluid is:
$$\vec{F}_b = -\iint_S p dS = \rho_a V_f \frac{d\vec{v}}{dt} = \rho_a V_f \lambda \hat{i}$$
Un-intuitively, this effective buoyancy force is actually pushing the fly forward in the direction of motion!
We can then do a simple Newtonian analysis to verify the acceleration of the fly relative to a fixed observer outside of the car, assuming the fly has some uniform density $\rho_f$:
$$\vec{F} = m\vec{a}$$
$$\vec{F_b} = \rho_a V_f \lambda \hat{i} = \rho_f V_f \vec{a}$$
$$\vec{a} = \frac{\rho_a}{\rho_f}\lambda \hat{i}$$
Counterintuitively, the unevenly pressurized air from the car's acceleration always causes the fly to accelerate forward, no matter what the density of the fly is! This seems to contradict intuition, but only if you realize that this acceleration is relative to a fixed outside observer. If we wanted to measure the acceleration of the fly relative to the acceleration of an observer inside the car, $\vec{a}_r$, we would have to subtract out the acceleration of the car $\frac{d\vec{v}}{dt}$ from the acceleration of the fly relative to a fixed observer $\vec{a}$:
$$\vec{a}_r = \vec{a} - \frac{d\vec{v}}{dt}$$
$$\vec{a}_r = \frac{\rho_a}{\rho_f}\lambda \hat{i} - \lambda \hat{i}$$
$$\boxed{\vec{a}_r = \left(\frac{\rho_a}{\rho_f} - 1\right)\lambda \hat{i}}$$
The boxed formula above indicates that the acceleration of a fly relative to an observer in the car with it will be forward if the fly/small object is less dense than air, and backward if the object is denser than air.
Since flies are slightly denser than air, you would expect an acceleration backwards that, depending on the car's acceleration magnitude $\lambda$, could be compensated by a fly's flight mechanisms. A person would certainly accelerate backwards, but something like a helium balloon would accelerate forwards (as shown in many experiments).
