Possible Duplicate:
Variable declaration placement in C
I really dont understand why when I declare variable 'm' like in snipped code below why it doesn't work???I declare m before I use it so what's the point?? thanks
    int main(){
    int a[] = {2,-4,6,47,59,-6,0};
    sort(a, 7);
    int m;
    for(m = 0; m < 7; m++){
        printf("%d ",a[m]);
    }
}
But if I put declaration at beggining, above the array, it works.
 
     
     
     
     
    