C语言多维数组的简单解析
C语言多维数组难点
讲解视频
/*
* Author: Mingchong Li
* Email: 19726006@bjtu.edu.cn
* Date: 2022/1/8
*/
#include <stdio.h>
#define X 2
#define Y 3
#define Z 4
/*
* Print the numbers one by one for the size of arrs and any dimension,
* '\n' when print line nums.
* Here we write *(arrs +i) in the function,
* if the block is in main(),
* we have to write ***arrs + i
*/
void print(int *arrs, int size, int line) {
for (int i = 0; i < size; i++) {
// Here we write arrs + i, but actually arrs + sizeof(int) * i when compiling
printf