Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors

Fundamentals of sub-programs

FUNDAMENTALS OF SUBPROGRAMS


General characteristics for all subprograms except co-routines:
  • Each subprogram has a single entry point.
  • The calling program unit is suspended during the execution of the called subprogram.
  • Only one subprogram remain in execution at any given time.
  • Control always returns to the caller subprogram when the called subprogram execution terminates.
Basic definitions:
  • A subprogram call is the explicit request that a specific subprogram be executed.
  • A active subprogram is which is in execution.
  • A subprogram header, which is the first part of the definition, provides name, type and parameters for subprogram. For example, int show(int a){  }.
  • The parameter profile of a subprogram contains the number, order, and types of its formal parameters.
  • The protocol of a subprogram is its parameter plus, its return type (if function).
  • The parameters in the subprogram header are called formal parameters.
  • Values passed in called subprograms parameters is called actual parameters.
  • The first actual parameter is bound to the first formal parameter and so forth. Such parameters are called positional parameters.
Principles of Programming Languages:

EasyExamNotes.com covered following topics in these notes.

Practicals:
Previous years solved papers:

A list of Video lectures

References:

  1. Sebesta,”Concept of programming Language”, Pearson Edu 
  2. Louden, “Programming Languages: Principles & Practices” , Cengage Learning 
  3. Tucker, “Programming Languages: Principles and paradigms “, Tata McGraw –Hill. 
  4. E Horowitz, “Programming Languages”, 2nd Edition, Addison Wesley 

Leave a Comment