If you know that side of a square is 4cm, you also know:
Since a square is regular quadrilateral all of its sides are equal to each other
AB = BC = CD = DA= 4cm
So, length of every side is known.
In △ ABC, using Pythagoras theorem
AB2+ BC2= AC2
42+ 42= AC2
2 × 42= AC2 = AC = 4√2cm
So we know the length of the diagonals since in square, both diagonals are equal in length AC = BD = 4√2cm
So we also know the length of the diagonals.