第九章完结

This commit is contained in:
lzy
2024-04-13 17:13:47 +08:00
parent 387681af20
commit 5dc779eb22
4 changed files with 205 additions and 0 deletions

24
Chapter9/arr.c Normal file
View File

@@ -0,0 +1,24 @@
#include <stdio.h>
#include <stdlib.h>
int main()
{
int *p;
int num = 5;
p = malloc(sizeof(int) * num);
for (int i = 0; i < num; i++)
{
scanf("%d", &p[i]);
}
for (int i = 0; i < num; i++)
{
printf("%d ", p[i]);
}
printf("\n");
free(p);
exit(0);
}