About 258,000 results
Open links in new tab
  1. Passing an array as an argument to a function in C

    Jul 4, 2011 · Here is the natural extension of this question: How to pass a multidimensional array to a function in C and C++. And here are several of my approaches to that problem.

  2. Passing an array by reference in C? - Stack Overflow

    In C arrays are passed as a pointer to the first element. They are the only element that is not really passed by value (the pointer is passed by value, but the array is not copied). That allows …

  3. Passing an Array by reference in C - Stack Overflow

    Pass by reference leads to a location in the memory where pass by value passes the value directly, an array variable is always an refference, so it points to a location in the memory.

  4. How to pass 2D array (matrix) in a function in C? - Stack Overflow

    161 C does not really have multi-dimensional arrays, but there are several ways to simulate them. The way to pass such arrays to a function depends on the way used to simulate the multiple …

  5. c++ - Passing an array by reference - Stack Overflow

    The name of an array variable, is a valid expression whose value is a pointer the the first member of the array. If you have some function foo(T* t), and you have an array T a[N]; then when you …

  6. Passing Fortran arrays to C - Stack Overflow

    in fact if you have a c double ** array of pointers you should join the arrays into a single array to pass it to fortran, see for example how to use Lapack in c.

  7. Changing array inside function in C - Stack Overflow

    In c you can't pass a variable by reference, the array variable that you assign inside the function contains initially the same address as the passed pointer, but it's a copy of it so modifying it …

  8. c - Pass an array to a function by value - Stack Overflow

    VIII.6: How can you pass an array to a function by value? Answer: An array can be passed to a function by value by declaring in the called function the array name with square brackets ([ and …

  9. Passing a std::array of unknown size to a function

    Absolutely, there is a simple way in C++11 to write a function that takes a std::array of known type, but unknown size. If we are unable to pass the array size to the function, then instead, …

  10. Passing multidimensional arrays as function arguments in C

    55 In C can I pass a multidimensional array to a function as a single argument when I don't know what the dimensions of the array are going to be? Besides, my multidimensional array may …