What's the point of declaration for formal parameters within the function prototype scope in C?
From my own test, it seems that the point of declaration for formal parameters in the prototype scope follows a left-to-right order (parameter name becomes visible within the prototype scope in left-to-right order), but I'm not sure. Could you kindly explain this or point me to the right place?
case 1: no complaints from gcc with c99 standard
int sum(int n, int a[n]);
case 2: "error: ‘n’ undeclared here (not in a function)" from gcc with c99 standard
int sum(int a[n], int n);
Both of the above cases are placed under a file scope with no variable named n in the file scope.