+ 3

What is jagged array ... ??

please give me example

11th Jul 2018, 3:28 AM
Vyom chandra Gallani
Vyom chandra Gallani - avatar
5 Respostas
+ 2
Jagged array means that the element of the Jagged array is an array, too. int *ja[10]; //each pointer points to an array. https://en.m.wikipedia.org/wiki/Jagged_array
11th Jul 2018, 3:38 AM
Disvolviĝo;
Disvolviĝo; - avatar
+ 1
Like this... var jagged = [ [1, 2, 3], [4, 5, 6] ]; So to get number 4, you need to type jagged[1][0] .
11th Jul 2018, 3:50 AM
James
James - avatar
+ 1
thank you very much
11th Jul 2018, 4:00 AM
Vyom chandra Gallani
Vyom chandra Gallani - avatar
+ 1
jagged array means array in array and it used popularly in java language
11th Jul 2018, 7:52 AM
Abdullahi Abdikadir
Abdullahi Abdikadir - avatar
+ 1
2 dimensional array int [][] jagged =new int[3][] In the above declaration, you declare a 2d array having 3 arrays. Each of these three arrays which belong to the jagged array need to be defined.
12th Jul 2018, 11:32 PM
Elroy Toscano
Elroy Toscano - avatar