#include /* * This is our modified "hello world" * including the example we used to crash the program * and the example with the pointer to pointer. */ int main() { // Crashing the program by accessing a random location in memory // Uncomment the lines below to give it a try //int *pointer_crash; //pointer_crash = 55555; //printf("Value inside pointer_crash is %p\n", pointer_crash); //printf("Value at address given by pointer_crash is %d\n", *pointer_crash); // Experimenting with a pointer to a pointer int i = 3; int *pointer; pointer = &i; int **pointer_to_pointer; pointer_to_pointer = &pointer; printf("Test0: %p\n", pointer_to_pointer); printf("Test1: %p\n", *pointer_to_pointer); printf("Test2: %p\n", pointer); printf("Test3: %d\n", **pointer_to_pointer); printf("Test4 %d\n", *pointer); // Let's write "hello world" to stdout printf("Hello World\n"); // Return 0 to indicate successful execution return 0; }