-2
#include <stdlib.h>
#include <stdio.h>
int main() {
char **last_names;
// last_names has been assigned a char * array of length 4. Each element of the array has
// been assigned a char array of length 20.
//
// All of these memory has been allocated on the heap.
// Free all of the allocated memory (hint: 5 total arrays).
return 0;
}
我知道free()方法,這是我的方法;免費的免費動態內存()
free(*last_names);
free(last_names);
但事實並非如此。任何幫助將不勝感激
而不是描述你的配置,在代碼中顯示它。 –
請添加代碼(1)分配'last_names',並(2)將單個元素分配給'last_names' – dasblinkenlight