In C programming, a function that does not take any arguments but returns a value is called a non-void function. The syntax for defining a non-void function is as follows
Syntax :
return_type function_name ( ) // Function Definition
{
// body of Statement ;
return value;
}
result = function_name();
//Return Without Argument Function in C #include<stdio.h> int add(); int main() { int a; a=add(); printf("\nTotal : %d",a); return 0; } int add() { int a,b; printf("\nEnter The Value of A & B : "); scanf("%d%d",&a,&b); return a+b; }To download raw file Click Here
Enter The Value of A & B : 6 45 Total : 51
Learn All in Tamil © Designed & Developed By Tutor Joes | Privacy Policy | Terms & Conditions