2023-04-22 15:35:32 +03:00
|
|
|
#include <stdio.h>
|
2023-05-06 18:10:38 +03:00
|
|
|
#include <stdlib.h>
|
2023-04-22 15:35:32 +03:00
|
|
|
|
2023-04-12 22:20:18 +03:00
|
|
|
int main()
|
|
|
|
{
|
2023-05-07 01:21:50 +03:00
|
|
|
for (int i = 0; i < 10; i++)
|
2023-05-06 18:10:38 +03:00
|
|
|
{
|
2023-05-07 01:21:50 +03:00
|
|
|
int* ptrs[10];
|
|
|
|
for (int j = 0; j < 10; j++)
|
2023-04-25 14:50:26 +03:00
|
|
|
{
|
2023-05-07 01:21:50 +03:00
|
|
|
ptrs[j] = malloc(10);
|
|
|
|
if (ptrs[j] == NULL)
|
|
|
|
{
|
|
|
|
perror("malloc");
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
*ptrs[j] = j;
|
|
|
|
putc('0' + *ptrs[j], stdout);
|
2023-04-25 14:50:26 +03:00
|
|
|
}
|
2023-05-07 01:21:50 +03:00
|
|
|
for (int j = 0; j < 10; j++)
|
|
|
|
free(ptrs[j]);
|
|
|
|
putc('\n', stdout);
|
2023-04-25 14:50:26 +03:00
|
|
|
}
|
2023-05-07 01:21:50 +03:00
|
|
|
|
2023-04-12 22:20:18 +03:00
|
|
|
return 0;
|
|
|
|
}
|