Czy mogę zwolnić () statyczne i automatyczne zmienne w C?

Kod jest następujący:

#include <stdlib.h>

int num = 3;   // Static external variable
int *ptr = &num;

int main(void)
{
 int num2 = 4;  // Automatic variable
 int *ptr2 = &num2;

 free(ptr);  //Free static variable
 free(ptr2); //Free automatic variable

 return 0; 
}

Próbuję skompilować powyższy kod i działa, jestem ciekawy czyfree() funkcja zdolna do uwolnienia zarówno zmiennej statycznej, jak i zmiennej automatycznej? Albo w zasadzie nic nie robi?

questionAnswers(2)

yourAnswerToTheQuestion