Generally in C program the function definition and calling takes the form as given below:
main()
{
int x,y,z;
z=sample(x,y);
printf(ā%dā,z);
}
sample(x1,y1)
int x1,y1;
{
int z1;
z1= x1 - y1;
return(z1);
}
Here what happens is the values x, y gets passed to x1,y1 and the value z1 is calculated in sample function and the value z1 is returned which is got in z. This value namely z is then printed.
Now let us see if the variables are not declared before the…
3 years ago