#include<stdio.h>
void print(char str[]) ///Receive the string
{
printf("
Your Massage: %s
",str);
}
int main()
{
char str[100];
printf("Please Enter A Massage: ");
gets(str);
print(str); ///call the function and pass the string
return 0;
}
Output
Please Enter A Massage: code to haven
Your Massage: code to haven
Add your comment