About 22,300,000 results
Open links in new tab
  1. How do I declare and initialize an array in Java? - Stack Overflow

    Jul 29, 2009 · The third way of initializing is useful when you declare an array first and then initialize it, pass an array as a function argument, or return an array. The explicit type is required.

  2. How do I declare an array variable in VBA? - Stack Overflow

    Aug 9, 2016 · Generally, you should declare variables of a specific type, rather than Variant. In this example, the test variable should be of type String. And, because it's an array, you need to indicate …

  3. How do I declare an array in Python? - Stack Overflow

    Aug 23, 2022 · The array structure has stricter rules than a list or np.array, and this can reduce errors and make debugging easier, especially when working with numerical data.

  4. Define Array in C - Stack Overflow

    A definition of a variable (notice no extern), eg. byte numbers2[MAX_NUMBERS2]; is effectively telling the C compiler that there is an array variable called numbers2 and it should allocate the space here, …

  5. How do I #define an array in C? - Stack Overflow

    One more possibility: if you want to define an array and initialize it with calls to a specific function, then you could, I suppose, try:

  6. excel - Creating an Array from a Range in VBA - Stack Overflow

    Jun 8, 2016 · This answer improves on previous answers as it will return an array from a range no matter what the size. It is also more efficient that other answers as it will return the array generated …

  7. Declaring and initializing arrays in C - Stack Overflow

    Is there a way to declare first and then initialize an array in C? So far I have been initializing an array like this: int myArray[SIZE] = {1,2,3,4....}; But I need to do something like this int

  8. How do I create an empty array and then append to it in NumPy?

    I want to create an empty array and append items to it, one at a time. xs = [] for item in data: xs.append(item) Can I use this list-style notation with NumPy arrays?

  9. python - How to define a two-dimensional array? - Stack Overflow

    Jul 12, 2011 · I want to define a two-dimensional array without an initialized length like this: Matrix = [][] But this gives an error: IndexError: list index out of range

  10. How can I initialize all members of an array to the same value?

    memset for an int array only works for very specific values, namely 128 multiples of 0x01010101 and their complements, Setting to -1 does initialize all elements of the array to -1 on machines that use …