In C programming, a function that takes one or more arguments but does not return a value is called a void function. The syntax for defining a void function with arguments is as follows:
Syntax :
return_type function_name ( data_type argument1, data_type argument2, ... ) // Function Definition
{
// body of Statement ;
}
function_name(value1, value2, ...);
//No Return With Argument Function in C #include<stdio.h> //Function Declaration void add(int,int); int main() { int a,b; printf("\nEnter The Value of A & B : ")l scanf("%d%d",&a,&b); //Function Calling add(a,b); // Actual Parameters return 0; } //Function Definition void add(int x,int y) //Formal Parameters { int c; c=x+y; printf("\nTotal : %d",c); }To download raw file Click Here
Enter The Value of A & B : 23 34 Total : 57
Learn All in Tamil © Designed & Developed By Tutor Joes | Privacy Policy | Terms & Conditions