That's why large arrays should be global or static. If the stack size is exceeded, a program will crash with no error message. There's no function to get an array size, since an array variable is in fact a pointer. So you must store the size in an extra variable.