UrgentHomeWork

Live chat

Available 24 x 7 Assignment Help

With Tutoring

# Passing Values Homework Help

So far the Functions we have discussed are Void Type. These Functions just display a message. Sometimes, we pass some values to the Function as argument and it returns a value which is used by the main or any other Function.

The following example will illustrate this:

```{`#include <stdio.h>
#include <conio.h>
int sub(int x, int y);
int mult(int x, int y);
void main()
{
//int a, b, result;
printf("Enter two integers: ");
scanf("%d %d",&a,&b);
printf("\nThe sum of two numbers is : %d",result);
result = sub(a,b);
printf("\nThe difference of two numbers is : %d",result);
result = mult(a,b);
printf("\nThe product of two numbers is : %d",result);
getch();
}

{
int result ;
result = x + y ;
return result ;
}

int sub(int x, int y)
{
int result ;
result = x - y ;
return result ;
}

int mult(int x, int y)
{
int result ;
result = x * y ;<
return result ;
}`}```

### Topics in C Programming

Resources
24 x 7 Availability.
Trained and Certified Experts.
Plagiarism Free.
Privacy Guaranteed.