Computing adjoint of differentiation operator This is a problem I have encountered in my studies and work in unbounded differential operators

Let us define the operator $T = -\frac{d^2}{dx^2}$ as an operator on $L^2(\mathbb{R})$ with domain $C_0 ^{\infty} (\mathbb{R})$ where the domain is the set of infinitely differentiable complex-valued functions on $\mathbb{R}$ with compact support. We are asked to compute the adjoint of this operator along with its domain (which extend the original $T$). Also, we are asked if this operator is essentially self-adjoint.

To be honest, I am new to this area of functional analysis and operator theory and so I find myself struggling, I do not know how to compute the adjoint and its domain. I know a basic criterion of essential self-adjointness is to check if the closure $\bar{T}$ is self-adjoint. I also know $T$ is symmetric (please see below) via integration by parts and using the boundary conditions arising from compact support. I have no idea how to do these things here or in practice in general. I thank all persons who can help with both parts of the problem.
***** Note: please let me clarify a few definitions. If $T$ is a densely defined linear operator on a Hilbert space $H$, the domain $D(T^*)$ is the set of $\phi \in H$ for which there is a $\eta \in H$ with
$$
\langle T\psi,\phi \rangle = \langle \psi,\eta \rangle
$$
for all $\psi \in D(T)$. For each such $\phi \in D(T^*)$ we define $T^* \phi = \eta$, and $T^*$ is called the adjoint of $T$. A densely-defined operator is said to be symmetric if $\langle T\phi,\psi \rangle = \langle \phi,T\psi \rangle$ for all $\phi,\psi \in D(T)$, and in this case $D(T) \subseteq D(T^*)$ and $T=T^*$ on $D(T)$ and $T^*$ is said to extend $T$. A symmetric operator is self-adjoint iff $D(T)=D(T^*)$ and thus $T=T^*$. An operator $T$ is said to be essentially self-adjoint if its closure $\bar{T}$ is self-adjoint, which is equivalent to $\ker(T^* \pm i) = \{0\}$ or $\text{Ran}(T \pm i)$ are dense in $H$.
 A: The adjoint $T^*$ is defined as the set of $g\in L^2(\mathbb{R})$ for which there exists a constant $C_{g}$ such that
$$
               |\langle Tf,g\rangle_{L^2}| \le C_g\|f\|_{L^2},\;\;\; \forall f\in \mathcal{D}(T).
$$
This inequality holds iff there is a unique $T^*g\in L^2$ such that
$$
                      \langle Tf,g\rangle = \langle f,T^*g\rangle,\;\;\; \forall f\in\mathcal{D}(T).
$$
($T^*g$ is unique if it exists because $\mathcal{D}(T)$ is dense in $L^2(\mathbb{R})$.) The Fourier transform $\mathcal{F}$ on $L^2$ can be brought to bear on $|\langle Tf,g\rangle| \le C_g\|f\|_{L^2}$:
$$
             \langle \widehat{Tf},\widehat{g}\rangle=\langle \widehat{f},\widehat{T^*g}\rangle \\
              \langle -\xi^2\widehat{f},\widehat{g}\rangle=\langle \widehat{f},\widehat{T^*g}\rangle \\
     \langle\widehat{f},-\xi^2\widehat{g}\rangle=\langle \widehat{f},\widehat{T^*g}\rangle \\
       \implies \widehat{T^*g}=-\xi^2\widehat{g} \in L^2 \\
        T^*g = -\mathcal{F}^{-1}\xi^2\mathcal{F}g
$$
So the adjoint $T^*$ is fully characterized in terms of the Fourier transform: it is unitarily equivalent to multiplication by $-\xi^2$ in the Fourier domain. Multiplication operators on $L^2(\mathbb{R})$ are self-adjoint.
$$
                   T^*=-\mathcal{F}^{-1}\xi^2\mathcal{F} \\
          \implies T^c = (T^*)^*=-\mathcal{F}^{-1}\xi^2\mathcal{F},
$$
where $T^c$ is the closure of $T$. $T^c$ is self-adjoint because it is unitarily equivalent to a multiplication operator.
A: Let $T:L^2(\mathbb{R})\rightarrow L^2(\mathbb{R})$ be the unbounded operator defined on the dense set $C_0^{\infty}(\mathbb{R})$ by $T=-\frac{d^2}{dx^2}$ then for $f,g\in C_0^{\infty}(\mathbb{R})$ we have by integration by parts:
$$\langle Tf,g\rangle=\int_{-\infty}^{\infty}-\frac{d^2}{dx^2}f(x)\overline{g(x)}dx=\int_{-\infty}^{\infty}\frac{d}{dx}f(x)\overline{\frac{d}{dx}g(x)}dx=-\int_{-\infty}^{\infty}f(x)\overline{\frac{d^2}{dx^2}g(x)}dx=\langle f,Tg\rangle$$
where there are no boundary values since $f,g$ have bounded support. This shows $T$ is symmetric on its domain.
$\textbf{Edit:}$ The question remains, for which $g\in L^2(\mathbb{R})$ is
$$f\mapsto\int_{-\infty}^{\infty}-\frac{d^2}{dx^2}f(x)\overline{g(x)}dx$$
a continuous functional on $C_0^\infty(\mathbb{R})$.
$\textbf{Edit:}$ By the Cauchy-Schwarz inequality and the above we have
$$|\langle Tf,g\rangle|\leq ||f||_{L^2(\mathbb{R})}\left(\int_{-\infty}^{\infty}|\frac{d^2}{dx^2}g(x)|^2dx\right)^{\frac{1}{2}}$$
which shows that the Sobolev space of twice weakly differentiable functions $H^2(\mathbb{R})$ is contained in the domain of the adjoint: $H^2(\mathbb{R})\subseteq D(T^*).$
