Functions in C
Functions in C
WOMEN
(Autonomous) Afternoon Session Chennai 18.
S.I.E.T.
Prepared by
M. MINU MEERA, Assistant Professor
A. JUNAITHA BARVEEN, Assistant
Professor
#include <stdio.h>
#include <stdlib.h>
list of function prototypes
int main(void)
{
...
}
int max(int a, int b)
{
...
}
int min(int a, int b)
{
...
}
void prn_random_numbers(int k)
{
...
}
#include <stdio.h>
#include <stdlib.h>
Three steps in using a function are defining a function, prviding a prototype and calling
the function.
Return statement is used to return the information from the function to the calling
Scope of a variable is defined as the region over which the variable is visible or valid.
3. Write a program to check whether the year is leap year or not using functions?
4. Write a program to find the square of first N Numbers and to calculate its sum?