Computer Science
‘C’ Function or Subroutine
Summary
C Function:
Type of Function:
Grade/Level:
Objective:
Time Allotment:
Introduction
‘C’ Language is a programming language which pre-describe and self made Function for doing work. Pre describe functions are also called Library function. ‘C’ program use Library function for working but if program is big or complex then modularity is used to form it. In this, the bigger program is divided into smaller-smaller simple (easy) programs which are independent to each other, so in this way we make that bigger program by joining these smaller one. ‘C’ language comes under the modular type.
C Function
Function is a group of self contained or independent statement which do a specific or particular function. When bigger program is split into smaller program and then they are executed according to the main function, so this sub-program is called as function. Function has the following advantages.
After dividing bigger Function into smaller one is can be read easily.
To understand this smaller function is very simple as computer to bigger Function.
Testing and error find in this smaller program is very easy then doing in bigger one.
Statement occur more than once in the function, is put once in an function can use when ever needed.
User can make it's own library according to it's need.
Type of Function
Library Function
User Defined Function
Library Function : These are those Function which are already stored in (language user can use these function directly in program. These are written when ‘C’ Language is developed. These function is divided in different Header file such as print f ( ), scan f ( ), getch ( ), clrscr ( ), etc.
User Defined Function : These are those which user form according to it's need or according to program. In other words, sub-program form the user according to the need of program is called as User Defined Function.
0 comments:
Post a Comment