In C, when an array is passed to a function, is it passed by value or by reference?
- By reference
- By value
- It depends on the array size
- Not possible to pass arrays to functions
In C, arrays are passed to functions by reference, which means that changes made to the array inside the function affect the original array in the caller.
Loading...
Related Quiz
- In C++, what is function overloading?
- In what scenario would using a nested structure be beneficial?
- What is the behavior of a union when different data types of different sizes are used?
- How can command line arguments be used to influence the flow of a program at runtime?
- You are developing an interactive application that continuously accepts user input until the user decides to exit. Which loop construct would be most appropriate for this scenario?