A truck is stationary and has a bob suspended by a light string, in a frame attached to the truck. The truck, suddenly moves to the right with an acceleration of a. The pendulum will tilt
As the truck move to the right, so the bob will move to the left due to inertia of rest with acceleration a.
Thus, the given situation can be drawn as
Now, from equilibrium of forces in above diagram (b), we get