Programming Languages Unit - III
Programming Languages Unit - III
UNIT - III
• FUNCTIONS
• Advantages of Functions
• The function provides modularity.
• The function provides reusable code.
• In large programs, debugging and editing tasks is
easy with the use of functions.
• The program can be modularized into smaller parts.
• Separate function independently can be developed
according to the needs.
• There are two types of functions in C
• FUNCTION TYPES
• 1.Built-in(Library) Functions
– The system provided these functions and stored in
the library. Therefore it is also called Library
Functions.
e.g. scanf(), printf(), strcmp, strlen, strcat etc.
– To use these functions, you just need to include the
appropriate C header files.
• User Defined Functions These functions are
defined by the user at the time of writing the
program.
• math.h LIBRARY FUNCTION
• All C inbuilt functions which are declared in
math.h header file are given below. The source
code for math.h header file is also given below for
your reference.
• LIST OF INBUILT C FUNCTIONS IN math.h FILE:
• “math.h” header file supports all the
mathematical related functions in C language. All
the arithmetic functions used in C language are
given below.
• Click on each function name below for detail
description and example programs.
Function Description