4. Among the following 4 propositions:
(1) In a right-angled triangle, if two sides are 3 and 4, then the third side is 5;
(2) $x \sqrt{-\frac{1}{x}}=\sqrt{-x}$;
(3) A quadrilateral with equal and perpendicular diagonals is a square;
(4) If in quadrilateral $A B C D$, $A D / / B C$, and $A B + B C = A D + D C$, then quadrilateral $A B C D$ is a parallelogram.
Among these, the number of correct propositions is ( ) .
(A) 0
(B) 1
(C) 2
(D) 3
4. (B).

Only (4) is correct.
As shown in Figure 2, extend $C B$ to $E$ such that $B E=A B$. Extend $A D$ to $F$ such that $D F=D C$. Then quadrilateral $E C F A$ is a parallelogram. Therefore, $\angle E=\angle F$.
Given $\angle A B C=2 \angle E, \angle A D C=2 \angle F$,
we know $\angle A B C=\angle A D C$.
Since $A D / / B C$, it follows that $\angle A B C+\angle B A D=180^{\circ}$,

which means $\angle A D C+\angle B A D=180^{\circ}$.
Thus, $A B / / C D$, and quadrilateral $A B C D$ is a parallelogram.