#include <stdio.h>
#include <stdlib.h>
int main() {
int *ptr = malloc(sizeof(int));
if (ptr == NULL) {
return 1;
}
*ptr = 100;
printf("Stored value: %d\n", *ptr);
// Return the memory to the system
free(ptr);
ptr = NULL; // avoid using it by accident later
return 0;
}