Detailed Discription of Category of Functions with Examples

Engg.... | 21:23 | | | Best Blogger Tips
Category of Functions

Category of Functions:
We have some other type of Functions where arguments and return value may be present or absent. Such functions can be categorised into:
  1. Function with arguments but no return value.
  2. Function with no arguments and return value.
  3. Functions with no arguments and no return values

So Let's have a look on Category of Functions one by one:

1. Function with Arguments but no return value: 
Here the called Function recieves the data from the calling function but the called function does not return any value back to the calling Function.So, let us understand with the help of Program:

Statement of C Program: This Program illustrates the Function with arguments but no return value:

#include<stdio.h>
#include<conio.h>
void main()
{
int a, b;
printf(" Enter the value of a and b\n");
scanf("%d%d" , &a ,&b);
largest(a, b);
}

/* Function to compute largest */

largest(c, d)
int c, d;
{
if(c>d)
{
printf(" Largest = %d\n");
}
else                                                    /* (c<d) */
{
printf(" Largest = %d\n");
}
return();
}

Output:
Enter the values of a and b
20
15
Largest = 20

                                     Function with no Arguments and Return Values                                

                                  Functions with no Arguments and no Return Values                             
Please Share it! :)
Do you like this Story?

Get Free Email Updates Daily!

Follow us!

4 comments:

  1. Your blog posts are more interesting and impressive. I think there are many people like and visit it regularly, including me.I actually appreciate your own position and I will be sure to come back here.
    b612 l b612 app l baixar b612 l download b612 l b612 apk

    ReplyDelete

  2. Its a wonderful post and very helpful, thanks for all this information. You are including better information regarding this topic in an effective way.Thank you so much

    Personal Installment Loans
    Title Car loan
    Cash Advance Loan

    ReplyDelete