boot.dev lesson answers for the course: Learn Memory Management in C
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

16 lines
301 B

#include <stdio.h>
int main()
{
const int pool_size = 1024 * 10;
char snek_pool[pool_size];
snek_pool[0] = 's';
snek_pool[1] = 'n';
snek_pool[2] = 'e';
snek_pool[3] = 'k';
snek_pool[4] = '\0';
printf("Size of pool: %d\n", pool_size);
printf("Initial string: %s\n", snek_pool);
return 0;
}