????????????????????????????????????
1 #define _CRT_SECURE_NO_DEPRECATE
2 #include<stdio.h>
3 #include<stdlib.h>
4 void createOneDimensionalVector(){
5     int n?? i;
6     int *arr;
7     scanf("%d"??&n);
8     arr = (int*)malloc(sizeof(int)*n);
9     for (i = 0; i < n; i++)
10         arr[i] = i;
11     for (i = 0; i < n; i++)
12         printf("%d "??arr[i]);
13 }
14
15 int main(){
16     createOneDimensionalVector();
17
18     return 0;
19 }
??????????????????
1 void createTwoDimensionalVector(){
2     int n=3?? m=4;
3     int** a;
4     a = (int**)malloc(sizeof(int*)*n);//?????????????飬?????????????????a
5     for (int i = 0; i < n; i++)
6         a[i] = (int*)malloc(sizeof(int)*m);//????????????
7
8     for (int i = 0; i < n; i++){
9         for (int j = 0; j < m; j++)
10             a[i][j] = i + j;
11     }
12
13     for (int i = 0; i < n; i++){
14         for (int j = 0; j < m; j++)
15             printf("%d "??a[i][j]);
16         printf(" ");
17     }
18 }
19 int main(){
20     createTwoDimensionalVector();
21
22     return 0;
23 }