/* Basic properties of pointers */
#include <stdio.h>

int main() {
	/* A constant string is a pointer to a memory region */
	char *str = "pippo";
	char *c=0; /* A pointer to a character, not initialized */
	int i;

	for(i=0; str[i]!='\0'; i++) {
		printf("%p: %c\n",&str[i], str[i]);
	}
	printf("\n");

    printf("c: %p\n", c);
    printf("&c: %p\n", &c);
    printf("*c: %d\n", *c);

	/* Use a pointer to iterate over a string */
	for(c=str; *c!='\0'; c++)
		printf("%p: %c\n", c, *c);
	printf("\n");

	return 0;
}
