Function with no argument but return value
When a function has arguments, it receive any data from the calling function but it returns no values.
Syntax:
int fun(void);
main()
{
int r;
r=fun();
}
int fun()
{
reurn(exp);
}
Example:
int sum();
main()
{
int b=sum();
printf(“entered %d\n, b”);
}
int sum()
{
int a,b,s;
s=a+b;
return s;
}
Here called function is independent and are initialized. The values aren’t passed by the calling function. Here the calling function and called function are communicated partly with each other.