\usepackage{listings}
% ...
\begin{lstlisting}[language=C, style=customc]
void test() {}
\end{lstlisting}