In C, as far as I can tell, there are two ways to create an array:
int arr[3] = {1,2,3}
and int *arr = malloc(3*sizeof(int))
What's the difference? I understand that when you call malloc(), it makes space in memory for the array, but when you don't use malloc() does it go into memory automatically or is it pushed onto the stack?
I'm pretty new to C, so I might be interpreting this wrong.
Edit: Syntax mistakes