In an aerodynamic stall, which flight control surface (limited to ailerons, elevators and rudder) remains effective for the longest period of time during the stalling condition? In other words, which of the three loses its effectiveness last?
It depends on the type of stall and the loading configuration of the aircraft. The short answer is that the rudder typically stalls last because the angle of attack of the wings is independent of the AOA of the vertical stabilizer. However it's usually among the least effective control surfaces in getting out of a straight dive (very useful for recovering from spins and spiral dives though).
Of the horizontal surfaces, it depends on which one has a higher AOA at the time the wings stall, which is dependent on how the plane entered the stall, and how the aircraft is configured. A sudden pitch-up in an airframe with an aft CG will cause the horizontal stabilizers and thus the elevators to depart first. In most other situations especially when the CG is forward of the CL, the wings will have the higher AOA as the nose pitches downward, so the elevators will remain useful as long as the tail isn't caught in the turbulent airflow off the wing. T-tails have this disadvantage; the higher tail location normally puts the tail in cleaner air, but in a stall the turbulent air off the wing shelters the tail making it less effective.
In a stall, the first part to show large-scale separation is the inner wing. This is intentional - all control surfaces should stay operational as long as possible. When the angle of attack is increased further, the separation extends outward and affects the ailerons first. The elevator flies in the downwash of the wing and sees less of an angle of attack change, even in an aircraft of marginal stability. With positive static stability, the lift coefficient of the horizontal tail is lower than that of the wing, increasing its stall margin further.
If the pitch-up is violent enough to even stall the horizontal tail (which happens regularly in a spin), the rudder will still see attached flow, albeit at a strong "sideslip" angle. But it will still be attached in the symmetric flow of a deep stall. In a spin, it might also separate if the rate of rotation is high enough.
So the sequence for separation in a stall is:
In a canard, things are reversed between wing and elevator, and the forward wing and its elevators will stall first. This way, the aircraft will pitch down automatically. Here the sequence is:
During recovery, the sequence is reversed: The control surface which has attached flow last will also be the first to show re-attached flow.
Note that separation means that only one side of the control surface shows separated flow - the opposite side is still working and provides the pilot with a limited controllability.