-4
#include<stdio.h>
int i=0, j=0;
void main(){
int a[3][5]={1,2,{3,4,6,8},{5,8,9},10,{11,12,13,14},{21,22},23,9,8,7,6,5,4,3};//Array Initialisation
for(i=0; i<3; i++){
for(j=0; j<5; j++){
printf("\na[%d][%d]:%d\n", i, j, a[i][j]);//Array Printing
}
}
}
/*The above code initialises the array with some logic that I'm unable to understand. How are the set elements treated? Please explain */
给定边界'[3] [5]',数组定义看起来不正确。 –
@boson请参阅示例[here](http://www.tutorialspoint.com/cprogramming/c_multi_dimensional_arrays.htm)。在C数组中,每行的长度应该是相同的... – urban
符合应使用的标准int main(void) –