Skip to content

Instantly share code, notes, and snippets.

@sukeesh
Created August 4, 2017 04:28
Show Gist options
  • Save sukeesh/800cf5c0397240af6f193667ce805723 to your computer and use it in GitHub Desktop.
Save sukeesh/800cf5c0397240af6f193667ce805723 to your computer and use it in GitHub Desktop.
#include <stdlib.h>
int main ()
{
int * buffer1, * buffer2, * buffer3;
buffer1 = (int*) malloc (100*sizeof(int));
buffer2 = (int*) calloc (100,sizeof(int));
buffer3 = (int*) realloc (buffer2,500*sizeof(int));
free (buffer1);
free (buffer3);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment