Separation theorem on the space of all complex continuous functions

Solution 1:

Take

$$\Lambda(f) = \int_0^{1/2} f(t)\,dt - \int_{1/2}^1 f(t)\, dt.$$

$\Lambda(B) = \{ z \in \mathbb{C} : \lvert z \rvert < 1\}$ can be verified with a little computation.

by the separation theorem of convex sets,we know there exists $\Lambda\in C^*$ such that $|\Lambda f|\leq 1$ for all $f\in B$ and $|\Lambda f|>1$ for $f\in B^c$

No, the complement $B^c$ of $B$ is not convex, so it cannot be separated from $B$ by a linear functional (every linear functional takes the value $0$ both in $B$ and $B^c$).