The line segment OC must intersect with AB at one point. If the intersection is not the midpoint m, that is what the second figure looks like. OC is shorter than CM+MO (Trilateral relationship of triangle)
So only CMO is on a line, and OC is the longest.