The correct option is C Li<Be<C<O<F
On moving from right to left in a period, the non-metallic character decreases (metallic character increases), as the atomic size increases and the force of attraction between the nucleus and the outermost electron decreases.
Therefore, on moving from right to left in a period, the ability to gain electron (non-metallic character) decreases. Therefore, the order is Li<Be<C<O<F.