Let $V$ be an inner product space and $W$ be a dense subspace of $V$ then $W^{\perp }={0}$. Let $V$ be an inner product space and $W$ be a dense subspace of $V$ .
Claim: $W^{\perp }={0}$.
Let non-zero $\ x\in W^{\perp} \implies (\forall w \in W,\ \langle x ,w\rangle=0)\ \implies W \subseteq x^{\perp}$ and $x^{\perp}$ is closed subspace.
So $W \subseteq x^{\perp} \implies  \overline{W} \subseteq \overline{x^{\perp}} \implies V \subseteq x^{\perp}$. This is a contradiction because this is possible only when $x=0$.
So $W^{\perp}=0.$
Is it okay and
also, is there any example of an inner product space $V$ and subspace  $W \leq V$, such that $W$ is not dense in $V$, but $W^{\perp}=0$?
 A: Your proof seems fine to me. Quick alternative proof: ${W}$ dense in ${V}$ means that every vector in ${V}$ can be written as the limit of ${w_n}$ for some sequence in ${W}$. Take some ${x \in W^{\perp}}$, and take some ${w \in V}$. Then take the sequence ${w_n \in W\ |\ w_n\to w}$. We have
$$
\langle w_n,x\rangle = 0\ \forall\ n \in \mathbb{N}
$$
by the continuity of the inner product,
$$
\Rightarrow \langle w,x\rangle = 0
$$
but the choice of $w$ was arbitrary. In particular, if we had ${w=x}$ we have that
$$
\langle x,x\rangle = 0
$$
which of course implies ${x=0}$. As required.....................
A: As a rule, I don't like writing proofs that go: "suppose $x \neq 0$ then ... and $x = 0$" if I don't have to. So I would just write: "let $x \in W^\perp$" then all that stuff you said so $x = 0$.

Is there any example of inner product space $V$ and subspace $W ≤ V$ , such that $W$ is not dense in $V$, but $W^⊥ = 0$?

Assuming the Hahn-Banach theorem (which is slightly weaker than the Axiom of Choice but still independent of ZF) then no.
Suppose $W$ is a closed, proper subspace of $V$ and $x \notin W$. Define a linear function $f : W \oplus \mathbb{R}x \to \mathbb{R}$ by $f(x) = 1$ and $f(w) = 0$ for all $w \in W$. Then $f$ is continuous and by the Hahn-Banach theorem, admits a continuous extension to all of $V$. By construction, this extension is in $W^\perp \setminus \{0\}$.
