largest line segment that can be drawn within a squqre of perimeter 20 cm

That would be the diagonal,

5 sqrt2 = 7.071 cm cm