Let $C$ be a smooth elliptic curve over $\mathbb C$.
Let $E$ be the non-split extension of $\mathscr O_C$ by itself:
$0\longrightarrow \mathscr O_C \longrightarrow E \longrightarrow \mathscr O_C \longrightarrow 0 $.
What is $h^0(C, E)?$
Using the long exact sequence of cohomology, we get
$0 \longrightarrow H^0(\mathscr O_C)\longrightarrow H^0(E)\longrightarrow H^0(\mathscr O_C)\stackrel{\text{$\delta$}}{\longrightarrow} H^1(\mathscr O_C)\stackrel{\text{}}{\longrightarrow}\dots$
By Riemann-Roch we have $H^1(\mathscr O_C) \cong H^0(\mathscr O_C) \cong \mathbb{C}$. But then $\operatorname{Ker}(\delta)$ could be anything from $0$ to $\mathbb C$?
The key here is that the non-split self-extension determines a nonzero element $\xi$ in $\operatorname{Ext}^1(\mathcal{O}_C,\mathcal{O}_C)$ as the image of $id_{\mathcal{O}_C}\in\operatorname{Hom}(\mathcal{O}_C,\mathcal{O}_C)$ under the connecting homomorphism coming from applying $\operatorname{Hom}(\mathcal{O}_C,-)$ to the short exact sequence of sheaves. After tracing the isomorphisms used in Serre duality, one may identify this element $\xi$ with an element of $H^1(\mathcal{O}_C)$ which is in the image of $H^0(\mathcal{O}_C)$ under the map $H^0(\mathcal{O}_C)\to H^1(\mathcal{O}_C)$ in the long exact sequence. This shows that the map $H^0(\mathcal{O}_C)\to H^1(\mathcal{O}_C)$ is injective and therefore an isomorphism of vector spaces, so we may conclude that $h^0(E)=h^1(E)=1$.