void example(int a[10]);
Why can't the compiler tell a is an int array of size 10 instead of a pointer?
When you pass an array to this function you are not copying the entire array, C is pass by value, therefore you must pass a pointer. In fact a behaving like an array would be lying to the programmer since you didn't make a copy of the array.
My "online search" found Walter Bright, who knows a thing or two about C compilers, wondering the same thing:
https://programmers.stackexchange.com/questions/245602/why-c...
( https://stackoverflow.com/questions/7454990/why-cant-we-pass... )
And partially this thread.
As for Walter; Stop using C like you want it to be used, and instead how it is meant to be used. The article takes a strawman position. Anyone who takes their time and learns C, knows that arrays decay.