Wednesday, 28 March 2012

Type of functions, Built in functions, User defined function


Type of functions:-
          Functions are of two type:-
  • Built in function or Library Functions
  • User defined functions

Built in functions:-
          Built in functions are the functions that are provided by C library. Many activities in C are carried out using library functions. These functions perform file access, mathematical computations, graphics, memory management etc.
          A library function is accessed simply by writing the function name, followed by an optional list of arguments and header file of used function should be included with the program.
          Definition of built in functions are defined in a special header file. A header file can contain definition of more than one library function but the same function can not be defined in two header files.

User defined function:-
          Functions provided by library are not enough for user so to complete their needs user has to define some functions themselves, these are called user defined functions.
          Means except built in functions user can also define and write small programs as functions to do a task relevant to their programs, there functions should be codified by the user, so that such functions can perform the task as desired by user.

6 comments:

  1. why printf and scanf are user define function

    ReplyDelete
    Replies
    1. Bcuz they are used regularly in every program

      Delete
  2. why printf and scanf are user define function

    ReplyDelete
    Replies
    1. These are not user defined functions these are predefined functions in standard input output header file.

      Delete
  3. Hello every one new blog has launched about computer www.learnfromtechno.blogspot.com

    ReplyDelete
  4. Can you show example of each function plz

    ReplyDelete