Saturday 10 April 2021

Rectangular & Jagged Array | Array Types Part 4 | PPL | Sebesta | Data Types in Programming Language

                    In this post, we will see Rectangular & Jagged Array | Array Types Part 4 | PPL | Sebesta | Data Types in Programming Language | array types, data types in ppl, data types ppl, elementary data types in programming language, ppl, sebesta,rectangular array,jagged array  


VI. Rectangular and Jagged Arrays

              A rectangular array is a multidimensioned array in which all of the rows have the same number of elements and all of the columns have the same number of elements.

 

e.g. int a[3][4]

 

              A jagged array is one in which the lengths of the rows need not be the same. For example, a jagged matrix may consist of three rows, one with 5 elements, one with 7 elements, and one with 12 elements. This also applies to the

columns and higher dimensions.

 

e.g.

arr[][] = { {0, 1, 2},

                 {6, 4},

                 {1, 7, 6, 8, 9},

                 {5}

              };           

 

              Fortran, Ada, C#, and F# support rectangular arrays.

              C# and F# also support jagged arrays.

 


Watch following video:

Watch on YouTube: https://www.youtube.com/watch?v=Jd4I8cBJyfo


No comments:

Post a Comment