#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
}
by Steffen Frost — Sep 28
#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
}