/* Print the number of days in a non-leap year. */ #include main() { int a[12] = { 31, /* January */ 28, /* February */ 31, /* March */ 30, /* April */ 31, /* May */ 30, /* June */ 31, /* July */ 31, /* August */ 30, /* September */ 31, /* October */ 30, /* November */ 31, /* December */ }; int *p; /* point to each array element */ int sum = 0; for (p = &a[0]; p < &a[12]; p = p + 1) { sum = sum + *p; } printf("%d\n", sum); }