//ay.c -- by tsaiwn@csie.nctu.edu.tw // test array and it's initialization // int printf(char*, ...); #include int x[3][5] = {1,2,3,4,5,6,7,8,9,10,11,12,13}; //不夠會自動補 0 // int x[3][5]={ {1,2,3,4,5}, {6,7,8,9,10}, {11,12,13} }; char haha[5][66] = {"hello how are you? Fine ok"}; int main( ) { int row, col; printf("%s\n", x); //? for(row=0; row <3; ++row) { for(col=0; col <=4; col++) printf(" %5d ", 5, 6, 7); printf("\n"); // new Line 換新列 } printf("Bye bye!\n"); return 0; // 表示正常結束 } /**************************************** C:\TESTC>tcc ay.c Turbo C++ Version 3.00 Copyright (c) 1992 Borland International ay.c: Turbo Link Version 5.0 Copyright (c) 1992 Borland International Available memory 4114388 C:\TESTC>ay 1 2 3 4 5 6 7 8 9 10 11 12 13 0 0 Bye bye! C:\TESTC> **************************/