About 50 results
Open links in new tab
  1. c++ - Return array in a function - Stack Overflow

    Aug 13, 2010 · 140 C++ functions can't return C-style arrays by value. The closest thing is to return a pointer. Furthermore, an array type in the argument list is simply converted to a pointer.

  2. How to define an array of functions in C - Stack Overflow

    I have a struct that contains a declaration like this one: void (*functions[256])(void) //Array of 256 functions without arguments and return value And in another function I want to define it, but...

  3. Javascript Array of Functions - Stack Overflow

    280 var array_of_functions = [ first_function, second_function, third_function, forth_function ] and then when you want to execute a given function in the array:

  4. What is the difference between np.array() and np.asarray()?

    Jan 19, 2013 · What is the difference between NumPy's np.array and np.asarray? When should I use one rather than the other? They seem to generate identical output.

  5. Correct way of passing 2 dimensional array into a function

    In C language, 2D array is just an array of arrays. Because of that, you should pass the function a pointer to the first sub-array in the 2D array. So, the natural way, is to say int (*p)[numCols] (that …

  6. Passing a 2D array to a C++ function - Stack Overflow

    Jan 7, 2012 · Strictly speaking, yes, they aren't 2D arrays, but this convention (albeit leading to UB) of having an array of pointers, each pointing to (a 1D) array, seems to be prevalent : ( Having a …

  7. Passing an array as an argument to a function in C

    Jul 4, 2011 · If a parameter is declared as an array with a specified size, the corresponding argument in each function call should point into an object that has at least as many elements as the array.

  8. How can I sort an array of integers? - Stack Overflow

    Jun 30, 2009 · 9 Array.prototype.sort () is the go to method for sorting arrays, but there are a couple of issues we need to be aware of. The sorting order is by default lexicographic and not numeric …

  9. javascript - Use async await with Array.map - Stack Overflow

    76 Solution below to properly use async await and Array.map together. Process all elements of the array in parallel, asynchronously AND preserve the order:

  10. Returning an array using C - Stack Overflow

    The upshot is that functions cannot return array types, which is fine since array expressions cannot be the target of an assignment, either. The safest method is for the caller to define the array, and pass …