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.
- Language Evaluation Criteria
- Influences on Language Design
- Language Categories
- Programming Paradigms
- Compilation
- Virtual Machines
- Programming Environments
- Issues in Language Translation
- Parse Tree
- Pointer and Reference type
- Concept of Binding
- Type Checking
- Strong typing
- Sequence control with Expression
- Exception Handling
- Subprograms
- Fundamentals of sub-programs
- Scope and lifetime of variable
- Static and dynamic scope
- Design issues of subprogram and operations
- Local referencing environments
- Parameter passing methods
- Overloaded sub-programs
- Generic sub-programs
- Design issues for functions
- Co routines
- Abstract Data types
- Abstraction and encapsulation
- Static and Stack-Based Storage management
- Garbage Collection
- OOP in C++
- OOP in Java
- OOP in C#
- OOP in PHP
- Concurrency
- Semaphores
- Monitors
- Message passing
- Java threads
- C# threads
- Exception handling
- Exceptions
- Exception Propagation
- Exception handler in C++
- Exception handler in Java
- Introduction and overview of Logic programming
- Basic elements of Prolog
- Application of Logic programming
- Functional programming languages
- Introduction to 4GL
Practicals:
- Memory Implementation of 2D Array.
- Memory Implementation of 3D Array.
- Implementation of pointers in C++.
- Write a program in Java to implement exception handling.
- Write a program in C++ to implement call by value parameter passing Method.
- Write a program in C++ to implement call by reference parameter passing Method.
- Write a program in Java to implement concurrent execution of a job using threads.
- Implement Inheritance in C#.
- Implement Encapsulation in C#.
- Implement static/compiletime Polymorphism in C#.
- Implement dynamic/runtime Polymorphism in C#.
Previous years solved papers:
A list of Video lectures
References:
- Sebesta,”Concept of programming Language”, Pearson Edu
- Louden, “Programming Languages: Principles & Practices” , Cengage Learning
- Tucker, “Programming Languages: Principles and paradigms “, Tata McGraw –Hill.
- E Horowitz, “Programming Languages”, 2nd Edition, Addison Wesley
- Memory Implementation of 2D Array.
- Memory Implementation of 3D Array.
- Implementation of pointers in C++.
- Write a program in Java to implement exception handling.
- Write a program in C++ to implement call by value parameter passing Method.
- Write a program in C++ to implement call by reference parameter passing Method.
- Write a program in Java to implement concurrent execution of a job using threads.
- Implement Inheritance in C#.
- Implement Encapsulation in C#.
- Implement static/compiletime Polymorphism in C#.
- Implement dynamic/runtime Polymorphism in C#.
Previous years solved papers:
A list of Video lectures
References:
- Sebesta,”Concept of programming Language”, Pearson Edu
- Louden, “Programming Languages: Principles & Practices” , Cengage Learning
- Tucker, “Programming Languages: Principles and paradigms “, Tata McGraw –Hill.
- E Horowitz, “Programming Languages”, 2nd Edition, Addison Wesley