2019-03-18 06:58:12 +01:00
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
int main() {
|
2021-08-07 20:51:18 +02:00
|
|
|
printf("Hello world!\n");
|
2019-03-18 06:58:12 +01:00
|
|
|
|
2021-08-07 20:51:18 +02:00
|
|
|
int* pI = (int*)malloc(sizeof(int));
|
|
|
|
*pI=2;
|
|
|
|
free(pI);
|
|
|
|
printf("Now freeing a pointer twice...\n");
|
|
|
|
free(pI);
|
|
|
|
printf("Did you notice?\n");
|
|
|
|
return 0;
|
2019-03-18 06:58:12 +01:00
|
|
|
}
|