when do we need to pass the size of array as a parameter

Viewed 7831

I am a little bit confused about pass an array in C/C++. I saw some cases in which the signature is like this

void f(int arr[])

some is like this

void f(int arr[], int size)

Could anybody elaborate what's the difference and when and how to use it?

8 Answers
Related