Blogger templates

Pages

Wednesday 15 August 2012

WAP of C Language that illustrates the Function with no Arguments and Return values

Category of Functions

Functions with no Arguments and Return value:
The called Function does not recieve any data from the calling Function. It is also a one-way data communication between the calling Function and the called Function. So let us understand this with the help of Program:

Statement of C Program: This Program illustrates the Function with no Arguments and Return values:

#include<stdio.h>
#include<conio.h>
void main()
{
float sum;
float total();
clrscr();
sum = total();
printf(" Sum = %f\n" , sum);
}
float total()
{
float a, b;
a = 5.0 ;
b = 15.0 ;
return(a+b);
}

Output:
Sum = 20.000000

                                                                    That's All

0 comments:

Post a Comment