The function described is toggling, which means the output switches to its opposite state (from 0 to 1, or from 1 to 0) on a clock pulse.
Let's analyze the behavior of different flip-flops:
(A) SR flip-flop: Has Set (S) and Reset (R) inputs. It doesn't have a dedicated toggle mode. The input S=1, R=1 is usually forbidden.
(B) D flip-flop: The D (Data) flip-flop simply passes the input D to the output Q on the clock pulse. It does not toggle.
(C) JK flip-flop: This is a versatile flip-flop. When both inputs J and K are set to 1 (J=1, K=1), the flip-flop enters toggle mode.
(D) T flip-flop: The T (Toggle) flip-flop is specifically designed for this purpose. When its single input T is 1, the output toggles on each clock pulse. When T is 0, the output holds its state.
While a JK flip-flop can be used to toggle, the T flip-flop is the circuit whose specific name and primary function is to toggle. A T flip-flop is essentially a JK flip-flop with J and K inputs tied together. Given the options, the T flip-flop is the most direct and correct answer.