Try this:
\documentclass{article}
\usepackage{listings}
\begin{document}
\begin{lstlisting}[language=C]
int main(int argc, char **argv)
\end{lstlisting}
\end{document}
listings package can be used to various languages. It put the keywords in bold.
You should use:
\begin{lstlisting}[frame=single]
if you want a frame around the code
You should use:
\lstset{language=C,morekeywords={filter},deletekeywords={main}}
\begin{lstlisting}[frame=single]
if you want to put more words in bold (in example the word filter will be shown in bold) or if you want to put a C keyword in normal font (in example: main will not be shown in bold)