Top "Arrays" questions

An array is an ordered linear data structure consisting of a collection of elements (values, variables, or references), each identified by one or more indexes.

How do I determine the size of my array in C?

How do I determine the size of my array in C? That is, the number of elements the array can …

c arrays memory
How can I create a two dimensional array in JavaScript?

I have been reading online and some places say it isn't possible, some say it is and then give an …

javascript arrays multidimensional-array
How to insert an item into an array at a specific index (JavaScript)?

I am looking for a JavaScript array insert method, in the style of: arr.insert(index, item) Preferably in jQuery, …

javascript jquery arrays
How do I determine whether an array contains a particular value in Java?

I have a String[] with values like so: public static final String[] VALUES = new String[] {"AB","BC","CD","AE"}; Given …

java arrays
How to declare an array in Python?

How do I declare an array in Python? I can't find any reference to arrays in the documentation.

python arrays
How to initialize all members of an array to the same value?

I have a large array in C (not C++ if that makes a difference). I want to initialize all members …

c arrays initialization array-initialize
"Notice: Undefined variable", "Notice: Undefined index", and "Notice: Undefined offset" using PHP

I'm running a PHP script and continue to receive errors like: Notice: Undefined variable: my_variable_name in C:\wamp\…

php arrays variables warnings undefined-index
Get the last item in an array

Here is my JavaScript code so far: var linkElement = document.getElementById("BackButton"); var loc_array = document.location.href.split('/…

javascript arrays
Adding values to a C# array

Probably a really simple one this - I'm starting out with C# and need to add values to an array, …

c# arrays
Sort array of objects by string property value

I have an array of JavaScript objects: var objs = [ { first_nom: 'Lazslo', last_nom: 'Jamf' }, { first_nom: 'Pig', last_nom: …

javascript arrays sorting comparison