Last active
January 8, 2021 21:28
-
-
Save gvnwltrs/56b606b35f0b6783980f9b5e3396a22d to your computer and use it in GitHub Desktop.
Array #C
This file contains hidden or 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
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