please,
1-how can i format my source code to get exactly the following format in my pdf file
2-how can do to have all the following code on one page (i use beamer):
Code: Select all
Code, edit and compile here:
\begin{verbatim}main (){ int pid;switch (pid = fork()){case –1:/* fork échoue */perror(''appel fork a echoue'');exit(1);case 0:/* valeur retournée au processus-fils */printf(''Fils: PID = %d\n'', getpid());break;default:/* processus père */printf(''Pere: PID fils = %d\n'', pid);break;}} /* end main */\end{verbatim}
I use the verbatim environment for smaller text, in the same document, and it works fine.
Thank you.