Skip to content

Instantly share code, notes, and snippets.

@AndyNovo
Created December 5, 2016 15:57
Show Gist options
  • Save AndyNovo/a0692d91c10ad870436aeffe04d8905d to your computer and use it in GitHub Desktop.
Save AndyNovo/a0692d91c10ad870436aeffe04d8905d to your computer and use it in GitHub Desktop.
int * data = (int *)malloc(100*sizeof(int));
data[0] = 5;
printIntLine(data[0]);
data = (int *)realloc(data, (130000)*sizeof(int));
if (data != NULL)
{
data[0] = 10;
printIntLine(data[0]);
free(data);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment