added pointer example

This commit is contained in:
Lukas Heiligenbrunner 2020-04-22 10:39:24 +02:00
parent f8c4fa22f8
commit 2c8f589227

View File

@ -190,8 +190,24 @@ public class Adresse
%------------------------------------------------
\begin{frame}{Pointer Syntax}
TODO Code example
\begin{frame}[fragile]{Pointer Syntax}
\begin{lstlisting}
#include <stdio.h>
int main()
{
//Variable declaration
int num = 10;
//Pointer declaration
int *p;
//Assigning address of num to the pointer p
p = #
printf("Address of variable num is: %p", p);
return 0;
}
\end{lstlisting}
\end{frame}
%------------------------------------------------