#include #include int main () { // Declare a pointer to an int. int *p; // Print the initial value of the pointer: printf ("Initial value of pointer: %p\n", p); // Prints 0 (C99) printf ("The number of bytes needed by an integer: %d\n", sizeof(int)); // Get the space from malloc: p = (int*) malloc (sizeof(int)); // Print the address of the memory block returned by malloc: printf ("Current pointer: %p\n", p); // Assign a value and print: *p = 5; printf ("Int value: %d\n", *p); // Free the memory when done: free (p); }