Look at the image below for a drawing of the segment.
We know that the midpoint divides the segment in half. Which means that the length of the whole segment divided by 2 is equal to the length of one part of the segment
AC = AB / 2
AC = 20 / 2
AC = 10
Hope this helped!
~Just a girl in love with Shawn Mendes