SyntaxFix
Write A Post
Hire A Developer
Questions
Because you store the array in the stack. You should store it in the heap. See this link to understand the concept of the heap and the stack.