Sizeof array through function in C [duplicate]
问题 This question already has answers here : How to find the 'sizeof' (a pointer pointing to an array)? (13 answers) Closed 5 years ago . I'm not sure why I cannot use sizeof(array) when passing the array through my function only outputs a value of 1, instead of 1000000. Before passing the array to the function, I printed out the sizeof(array) to get 4000000 and when I try to printout the sizeof(array) in the function, I only get 4. I can iterate through the array in both the function and the