
10-14
Computer Programming with C
Explanation:
In the above program, three values date, month and year are passed to the function dat().
e function displays date. e function dat() returns the next date. e next date is print-
ed in function main(). Here, function dat() receives arguments and return values.
10.12 Write a program to send values to user-dened function and receive and display the return
value.
printf(“Enter Date dd/mm/yy :”);
scanf(“%d %d %d”,&d,&m,&y);
t=dat(d,m,y);
printf(“\nTomorrow = %d/%d/%d”,t,m,y);
return 0;
}
dat (int x, int y, int z)
{
printf(“\nToday = %d/%d/%d”,x,y,z);
return(++x);
}
OUTPUT:
Enter ...