针对部分元素的初始化static int b[5] = {1, 2, 3];b[0] = 1, b[1] = 2, b[2] = 3, b[3] = 0, b[4] = 0auto int fib[20] = {0, 1];fib[0]=0,fib[1]=1,其余元素不确定如果对全部元素都赋初值,可以省略数组长度int a[10]=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]建议不要省略数组长度static int b[5] = {1, 2, 3}; b[0] = 1, b[1] = 2, b[2] = 3, b[3] = 0, b[4] = 0 auto int fib[20] = {0, 1}; fib[0] = 0, fib[1] = 1, 其余元素不确定 ◼ 如果对全部元素都赋初值,可以省略数组长度 int a[ 10 ] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} 针对部分元素的初始化 建议不要省略数组长度