Given
The linear charge density on upper half of segment of ring is λ and at lower half it is −λ .
The direction of electric field at centre O of ring can be calculated as
Directions of electric field due to upper half and lower half will be as shown