Answer: A
Explanation: If the DATA pin is in sync with the CLK pin, then we can say that it is moving in the clockwise direction. However, here in this case, the DATA pin, during the first half of the pulse train is not in sync and appears to have a 90 degree phase shift which entails that the rotary encoder must be turning anticlockwise. However, during the second half of the pulse train it appears to be in sync with the CLK pin, so it is turning clockwise. So, from that we can say that the rotary encoder must be swinging.