Last active
November 15, 2019 16:21
-
-
Save Silva97/ff9956ef8db8ab861bcb69ff5e4b027b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#define ASIZE 4 | |
int main(void) | |
{ | |
// char *a[ASIZE]; | |
char **a = malloc(sizeof (char *) * ASIZE); | |
for (int i = 0; i < ASIZE; i++) | |
a[i] = malloc(32); | |
for (int i = 0; i < ASIZE; i++) | |
free(a[i]); | |
free(a); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment