Tamilnadu Samacheer Kalvi 12th Computer Science Notes Chapter 1 Function Notes
Expression of Algorithm:
Algorithms are expressed using statements of a programming language
Subroutine:
Subroutines are small sections of code that are used to perform a particular task that can be used repeatedly.
Function:
- A function is a unit of code that is often defined within a greater code structure.
- A function contains a set of code that works on many kinds of inputs and produces a concrete output.
Definition:
Definitions are distinct syntactic blocks.
Parameters:
Parameters are the variables in a function definition.
Argument:
Arguments are the values which are passed
Object:
An object is an instance created from the class.
Interface:
- An interface is a set of action that an object can do.
- Interface just defines what an object can do, but won’t actually do it.
Implementation:
Implementation carries out the instructions defined in the interface.
Pure functions:
Pure functions are functions which will give exact result when the same arguments are passed.
Impure function:
The functions which cause side effects to the arguments passed are called Impure function.
Recursive function:
A function definition which calls itself is called recursive function.