Motivation: the information need of computer programs

  • A computer program processes information (data)

  • Information (data) used in computer programs can be broadly categorized in the following 2 categories:

      1. Long term information that are used by multiple functions/methods

        Example:

          • The StackTop for a stack data structure is used by push( ) and pop( )

      2. Short term information that are used by one function/method

        Example:

          • A loop index i in a for-loop inside a function/method

              for ( int i = 0; i < 10; i++ ) ....