April 30, 2014

Introduction to Two Dimensional arrays | C Programming

08:53 Posted by Durga swaroop Perla No comments
C Programming Language allows for the use of multidimensional arrays.
An array what we generally mean is a one - dimensional array. An array can be 1-Dimensional, 2-Dimensional, 3-Dimensional, .... so on. In this particular post (assisted by the YouTube video ) we'll learn about the Two dimensional arrays.
Two dimensional arrays will have 2 dimensions, i.e, it is extended in both horizontal and vertical directions, unlike a 1-D array which is represented in a linear form.
And, just as we can access individual elements in a 1-Dimensional array, we'll be able to access each location in the array, using the respective indices (row number, column number).
A two dimensional array with 'a' rows and 'b' columns can be defined like this.
type name_of_array [a] [b] ;
That will create a 2-Dimensional array in the memory. And, you can address the locations in this array using two indices rather than one (as in a 1-D array).
http://durgaswaroop.blogspot.in/2014/04/introduction-to-two-dimensional-arrays.htmlSo, the addressing would be something like the following (for a array named serica)
serica [0] [0]
serica [0] [1]
serica [0] [2]

        .
        .
serica [1] [0]
serica [1] [1]
serica [1] [2]
        .
        .
And, that goes on till we finish all the elements in that array.
Watch the following video which explains all these things clearly.



So, 2-Dimensional arrays are not that hard anymore, are they? Let us know your thoughts on this video. We love to hear from you.
 As always have a Happy reading !
------------------------------------------------------------------------------------------------------
          Subscribe to our blog by entering your mail in the Get free updates! to your right, so that you won't miss any important post and also to be the first to get informed

Follow us on our Facebook  page @ Fre Blogg 
        Head over to my You Tube channel for some interesting tutorials @ You Tube



0 comments:

Post a Comment

Please Enter your comment here......