This commit is contained in:
Karmaz95 committed 2024-01-06 22:06:00 +01:00
1 parent 6073ce1ae6
commit dec6d69edc
12 files changed
+5553 -2

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
#include <stdio.h>
#include <stdlib.h>
int main() {
// Allocate memory on the heap
char *heapMemory = (char *)malloc(100 * sizeof(char));
if (heapMemory == NULL) {
fprintf(stderr, "Memory allocation failed.\n");
return 1;
}
printf("Memory allocated. Press Enter to exit.\n");
// Wait for Enter key press
while (getchar() != '\n');
// Free allocated memory
free(heapMemory);
return 0;
}