Define Array? Discuss the different type of Array? 3rd-Sem


Definition of Array 

Array have been output. array is a performed by the user. when display result the program will output one element of the array at a stored. array stored variable and values anything stored the array have been output. An array is collection of same data type element in every language use in computer system. It is means an array is a group of homogeneous data which share same name with continuous memory allocate. It is a primary data type use in C language and store maximum data. At the run time in the programming system array represent fix size and dynamic size of length with the help of different variable.


                            TYPE ARRAY-NAME [n]

 a). int A[5] ;                              =                        Fixed size Array

b). int  A[n] ;                              =                       Dynamic size array

 

Definition of Memory Representation of An Array


Memory Representation is a allow process reader. It is a general one of the most regular and heavily studied topic in a attention. memory representation is a role that working memory re play in controlling perform of the array part. It is high level task is allow for array. memory representation is a role of long term memory in controlling. The pointer define the first location of a variable. In the computer system array represent dynamic memory allocation function of each variable at the run time.


Application of an Array:-


  • It store large number of element.
  • Continuous memory allocation system. 
  • Sequence index storage data type.
  • Group of same variable.
  • mathematical operation on matrix.

                                Types of Array

A) . One Dimensional Array :- One dimensional  array is a physics and mathematics a sequence (n) number can specials location in (n). One dimensional is a technically structure. It is a refers of the terms in a algebraic geometry. There are server structure .The one dimensional array is an array in which the element are represent in single row and single column.

                               Type Array- name[n] ;   =    n: Size of Array    

                                    int A[n] ;  =     Dynamic size Array

                                    Size ( length of Array) = UB - LB + 1

B).  Two Dimensional Array :-  Two dimensional array is a two values. It is a geometric setting in values. Two dimensional space is a can be projection the physical on to a plane. Two dimensional depend  on the length and width. It is a factors related. Two Dimensional array is a 2-D shapes. Does not allow one shape. In Two dimensional array user represent the data element in the both row and column . This type of array use in mathematical matrix structure. 

                               Type Array- name [m] [n] ;

                                 Ex.)  int  A[3] [2] ;

                             Address = Base + w[N(k-1)+ (j-1)] 


C). Multi Dimensional Array :- It is a define by row and column index. multi dimensional is a 2-D matrix and 3-D matrix uses by user. It is a addition and subscribe. It multi- dimensional array data represent in table structure which consist of different data at the run time with the help of table attributes. 


                                   Type Array- name [m] [n] ........;


Advantage of Array   

  • Array represent all value of a list.
  • It define implicit of a program.
  • It hold the same type of elements in the data structure.
  • The size of array depend on user need.
          Example:- 

                                     # include < stdio.h>

                                    # include < conio.h>

                                          Void main()

                                  {

                                     int i [4], i, A=0 ;

                          printf ("Enter the value") ;

                          for (i=0 ; i<==4 ; i++)

                     {

                        scanf ( "%d", & i[j] ) ;

                     } 

                      for ( j=0 ; j<=4 ; j++)

                    }

                        A=A+ i[j] ;

                   }

                    printf (" \ n %d" , A);

                               getch();

                 }

                      Output

        Enter the value

                  1 

                 2

                 3

                4



                                        





        

 

No comments:

Post a Comment

If you have any doubts, Please lets me know and Please Follow our Website