c语言 11 - 2
1、
#include <stdio.h> int main(void) { int i; char a[][5] = {"LISP","C","Ada"}; char *p[] = {"PAUL","X","MAC"}; int j = 0; while(1) { int k = 0; while(a[j][k]) { k++; } if(k == 0) break; j++; } for(i = 0; i < j; i++) printf("a[%d] = %s\n", i, a[i]); for(i = 0; i < 3; i++) printf("p[%d] = %s\n", i, p[i]); return 0; }