The internal energy is of any ideal gas can be written as \begin{align} U &= U(T,N) \end{align} meaning that the internal energy depends only on the number of particles and the temperature, but not the volume.\footnote{This relationship happens to be linear at low temperatures, where “low” is defined relative to the energy of the excited states of the molecules or atoms.} The ideal gas law \begin{align} pV &= Nk_BT \end{align} defines the relationship between $p$, $V$ and $T$. You may take the number of molecules $N$ to be constant. Consider the free adiabatic expansion of an ideal gas to twice its volume. “Free expansion” means that no work is done, but also that the process is also neither quasistatic nor reversible.