added pointer example
This commit is contained in:
parent
f8c4fa22f8
commit
2c8f589227
20
src/main.tex
20
src/main.tex
@ -190,8 +190,24 @@ public class Adresse
|
|||||||
|
|
||||||
%------------------------------------------------
|
%------------------------------------------------
|
||||||
|
|
||||||
\begin{frame}{Pointer Syntax}
|
\begin{frame}[fragile]{Pointer Syntax}
|
||||||
TODO Code example
|
\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}
|
\end{frame}
|
||||||
|
|
||||||
%------------------------------------------------
|
%------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user