#include int main(void) { int a = 5; int *ap; char str[]="Hello, world"; char *strp = str; ap = &a; printf("The value (a) = %d\n", a); printf("The address (&a) =%p\n", &a); printf("The value (ap) = %p\n", ap); printf("The address (&ap) = %p\n", &ap); printf("The value of *ap = %d\n\n", *ap); printf("The value (str) = %s\n", str); printf("The address (&str) =%p\n", &str); printf("The value (strp) = %p\n", strp); printf("The address (&strp) = %p\n", &strp); printf("The value of *str = %c\n", *strp); printf("The value of *++str = %c\n", *++strp); printf("The value of *++str = %c\n", *++strp); printf("The value of *++str = %c\n", *++strp); printf("The value of *++str = %c\n", *++strp); printf("The value of *++str = %c\n", *++strp); printf("\n"); strp = &str[0]; while(*strp) { putchar(*strp++); } putchar('\n'); strp = str; while(*strp) { putchar(*strp++); } putchar('\n'); /* この辺りがプログラミング言語 C の面妖なところ */ /* 頑張って理解してねー(^^)/~ */ for ( strp = str; *strp; *strp++ ) { putchar(*strp); } putchar('\n'); return 0; }