added pointer example
This commit is contained in:
		
							
								
								
									
										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}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
%------------------------------------------------
 | 
					%------------------------------------------------
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user