在C语言中,静态数组声明的技巧有以下几点:
#define ARRAY_SIZE 10
int array[ARRAY_SIZE];
int array[] = {1, 2, 3, 4, 5};
int size = sizeof(array) / sizeof(array[0]);
int array[] = {1, 2, 3, 4, 5};
int matrix[3][3] = {
{1, 2, 3},
{4, 5, 6},
{7, 8, 9}
};
const int array[] = {1, 2, 3, 4, 5};