Theocacao
Leopard
Design Element
Comment on "Intro to C Pointers and Dynamic Memory"
by Steffen Frost — Sep 28
Just to be cute:

#include main () { int number; // declare an int var int* pointer; // declare an integer's pointer var number = 5; //set value for 'number' var pointer = &number; // pointer is 'addressof' (& operator) of num printf (" number is: %i\n", number); printf ("&number is: %p\n", &number); // the 'addressof' the num printf ("pointer is: %p\n", pointer); // and here printf ("*pointer is: %i\n", *pointer); printf ("*&number is: %i\n", *&number); // contents of addressof the variabe }
Back to "Intro to C Pointers and Dynamic Memory"
Design Element

Copyright © Scott Stevenson 2004-2015