Hacker News new | past | comments | ask | show | jobs | submit login
Why can't arrays be passed as function arguments in C? (programmers.stackexchange.com)
1 point by RKoutnik on June 20, 2014 | hide | past | favorite | 1 comment



The type of array in C will determine how it is store din memory (see here for a good description: https://stackoverflow.com/questions/10696024/how-is-the-arra...). Unlike a dynamic language like ruby or python, C statically addresses the elements of an array in memory. Pointers refer to the memory address of the array elements allowing you to use them as a variable, but not the whole array.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: