[Solved] why the array is static [closed]
The function isn’t the pointer. The return value is int * since it returns an array of int. You need a pointer to access an array. If it’s not a pointer, then you are expecting a single int variable. If it’s not static, then the array will be deallocated and gone when the function reached … Read more