Skip to content

Instantly share code, notes, and snippets.

@gvnwltrs
Last active January 8, 2021 21:28
Show Gist options
  • Save gvnwltrs/56b606b35f0b6783980f9b5e3396a22d to your computer and use it in GitHub Desktop.
Save gvnwltrs/56b606b35f0b6783980f9b5e3396a22d to your computer and use it in GitHub Desktop.
Array #C
int main()
{
int arr[];
return 0;
}
// another array example
#include <stdio.h>
// global array (outside all functions) so on the heap
// do not need to free() anything that hasn't used malloc, ralloc, or calloc
//int numbers[];
//also a global but essentially making this a private member to the file
//static int numbers[];
int main()
{
int numbers[5]; // created on the stack
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment