Saturday, July 27, 2019

passing string to a function print the name

passing string to a function print the name.


passing string to a function print the name



#include<stdio.h>
#include<conio.h>
void displayname(char name1[]);
void main()
{
char string[20];
clrscr();
printf("Enter Your Name:-");
gets(string);

displayname(string); // Passing The Function..
getch();
}
void displayname(char name1[])
{
puts(name1); //
}

Output:



EmoticonEmoticon