Page 165 - DCAP507_SYSTEM_SOFTWARE
P. 165

Unit 10: Programming Languages Concept (I)




          This last fragment would print                                                        Notes
                           0:      1:      2:      3:     4:      5:     6:
                   0       0       1       2       3      4       5      6
                   1:      10      11      12      13     14      15     16
                   2:      20      21      22      23     24      25     26
                   3:      30      31      32      33     34      35     36
                   4:      40      41      42      43     44      45     46
          Finally, there's no reason we have to loop over the “rows” first and the “columns”  second;
          depending on what we wanted to do, we could interchange the two loops, like this:
                 for(j =  0; j  < 7;  j =  j +  1)
                         {
                         for(i =  0; i  < 5;  i =  i +  1)
                                printf("%d\t",  a2[i][j]);
                         printf("\n");
                         }
          Notice that i is still the first subscript and it still runs from 0 to 4, and j is still the second subscript
          and it still runs from 0 to 6.




              Task  What are Structure Data Types? Give examples.

          Self Assessment

          Fill in the blanks:
          5.   The kind of data that variables may hold is called as ............................
          6.   An ............................ data type is a user created data type in which the values, appropriate to
               the data type, are specified in a user-defined list.
          7.   Structure data types are formed from ............................ data types.

          10.4 Data Structures


          All high level languages share a set of intercepted structure of data structure that generates the
          languages. These normal data structures are strings, arrays, I/O, Stacks, Queues, Linked Lists,
          Trees, Graphs, Hash tables, and Vectors. Based on the architectural reasons of the high level
          languages, these data structures are more complicated in design and more expressive in the
          languages whose reasons are more defined or drawn out toward computing a set of troubles.

               !
             Caution  A programmer must own a practiced knowledge of a programming language
             data structure so as to fully discover all of the properties of the language in the execution
             of an application.
          Each computer programming language that was ever designed belongs to one of these classes of
          paradigm that  defines  its reason: imperative,  object-oriented, event-driven,  simultaneous
          distributed, generic, array-oriented, procedural, reflective, and functional.




                                           LOVELY PROFESSIONAL UNIVERSITY                                   159
   160   161   162   163   164   165   166   167   168   169   170