Â
In this, we are going to see the Functions that have no arguments but returns a value, this program we are going to see subtraction of two numbers using C Programming Language.
#include <stdio.h>
void sub()
{
int a, b,diff;
printf("Enter two numbers: \n");
scanf("%d\n %d", &a, &b);
diff = a - b;
return diff;
}
int main()
{
printf("Subtraction is: %d",sub());
return 0;
}
//........Coded by YASH ALLAPURIA
#ENJOY CODING
Post a Comment
FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP