Function Passing Arguments and Returning no Value

0
2
digitalample eye

Write a program to illustrate the program function passing arguments and returning no value.

Write a c program to demonstrate function passing arguments and returning no value

C Code

#include <stdio.h>
#include <conio.h>

void sum (int, int);

void main()
{
int a,b;
printf("enter two numbers :");
scanf("%d%d",&a,&b);
sum(a,b);
getch();
}
void sum(int s, int t){
int add;

add = s+t;

printf("n The sum of the two numbers is : %d", add);

}

Output

Function Passing Arguments and Returning no Value

LEAVE A REPLY

Please enter your comment!
Please enter your name here