¿Puedo liberar () variables estáticas y automáticas en C?
El código es el siguiente:
#include <stdlib.h>
int num = 3; // Static external variable
int *ptr = #
int main(void)
{
int num2 = 4; // Automatic variable
int *ptr2 = &num2;
free(ptr); //Free static variable
free(ptr2); //Free automatic variable
return 0;
}
Intento compilar el código anterior y funciona, tengo curiosidad por hacer elfree()
¿Función capaz de liberar tanto la variable estática como la variable automática? ¿O básicamente no hace nada?