Introduction to Programming
UNIT-3
FUNCTIONS AND ARRAYS
,FUNCTIONS AND ARRAYS
• A function is a block of code which only runs when it is called.
• A function is a series of instructions or a group of statements with
one specific purpose.
• It is a program segment that carries out some specific, well-defined
task.
• Every C program has at least one function, which is main().
,Types of Functions
• C functions can be classified into two types,
1. Library functions /predefined functions /standard
functions /built-in functions.
2. User-defined functions.
, 1. Library functions /predefined functions/
standard functions/built-in Functions
• These functions are defined in the library of the C compiler, which
are used frequently in the C program.
• These functions are written by the designers of the C compiler.
• C supports many built-in functions like
✓ Mathematical functions. ✓ Memory management functions.
✓ String manipulation functions. ✓ Error handling functions.
✓ Input and output functions.
UNIT-3
FUNCTIONS AND ARRAYS
,FUNCTIONS AND ARRAYS
• A function is a block of code which only runs when it is called.
• A function is a series of instructions or a group of statements with
one specific purpose.
• It is a program segment that carries out some specific, well-defined
task.
• Every C program has at least one function, which is main().
,Types of Functions
• C functions can be classified into two types,
1. Library functions /predefined functions /standard
functions /built-in functions.
2. User-defined functions.
, 1. Library functions /predefined functions/
standard functions/built-in Functions
• These functions are defined in the library of the C compiler, which
are used frequently in the C program.
• These functions are written by the designers of the C compiler.
• C supports many built-in functions like
✓ Mathematical functions. ✓ Memory management functions.
✓ String manipulation functions. ✓ Error handling functions.
✓ Input and output functions.