Function with arguments and no return values - C Programming
C Program to send value to user‒define function and display the result.
/* Program to send value to user‒define function and display the result */
#include <stdio.h>
#include <conio.h>
void main()
{
/* Local definitions */
int date(int, int, int);
int dd,mm,yy;
/* Statements */
clrscr();
printf("Enter the Employee joining date .\n");
printf("Enter date,month,year : ");
scanf("%d %d %d", &dd, &mm, &yy);
date (dd,mm, yy); function call */
} /* main */
date(int x, int y, int z)
{
printf("Employee Joined date is : %d/%d/%d",x,y,z);
getch();
}
OUTPUT
Enter the Employee joining date.
Enter date,month, year: 11 12 1981
Employee Joined date is: 11/12/1981
EXPLANATION: In this program, three values are passed to date() function. The date() function receives the arguments from main() function and prints the date in a format and the date function did not return any values to the main function.
Computer Programming C Laboratory: Functions C Programs : Tag: C Programming : - C Program to send value to user‒define function and display the result (Function with arguments and no return values)