1. Function with Arguments but no return value:
Here the called Function receives the data from the calling function but the called function does not return any value back to the calling Function.
Example program:
#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);
max(a, b);
}
/* Function to compute largest */
void max(int c, int d)
int c, d;
{
if(c>d)
{
printf(" Largest = %d\n");
}
else /* (c<d) */
{
printf(" Largest = %d\n");
}
}
Category of Functions
Functions
No comments:
Post a Comment