Basic classical linear error correcting code for bits exercice (from Nielsen & Chuang)
Suppose that $e_1, \ldots, e_k$ are (linearly independent) rows of the generator matrix of $C$. We can find vectors $e_{k+1}, \ldots, e_{n}$ s.t. $\{e_i\}_{i=1}^n$ is a basis in $\mathbb{F}_2^n$ (not necessarily orthogonal). 

$\textbf{Claim 1.}$ $\exists i \in [k],$ s.t. $\langle x, e_i \rangle = 1$. Otherwise, for $\forall y \in C$ the inner product $\langle x, y \rangle = \sum_{i=1}^k \beta_i \langle x, e_i \rangle = 0,$ where $y = \sum_{i=1}^k\beta_ie_i$ is the basis decomposition of $y$ (all operations are modulo 2). Hence, the assumption that $x \notin C^{\perp}$ is incorrect.

Without loss of generality, $\langle x, e_1\rangle = \ldots = \langle x, e_s\rangle = 1$, $\langle x, e_{s+1}\rangle = \ldots = \langle x, e_k\rangle = 0$ for some $s \in [k]$.

Then $\langle x, y\rangle = \sum_{i=1}^s\beta_i$. The number of sequences $\{\beta_i\}_{i=1}^s$ of an even weight is the same as the number of odd-weight sequences, and it's equal to $2^{s-1}$, which concludes the proof.