思想:
1.申请一篇堆空间用来存储要打印的数据;
2.依次给数组元素赋值即可;
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int *print_num(int number,int *return_Size) {
int i = 0;
*return_Size = pow(10, number)-1;
int *res = malloc(sizeof(int)*(*return_Size));
for (i; i < *return_Size; ++i) {
res[i] = i+1;
}
return res;
}