Answer Posted / vignesh1988i
#include<stdio.h>
#include<conio.h>
void str_cpy(char *,char *);
void main()
{
char a[20],b[20];
printf("enter the string to be copied:");
gets(b);
str_cpy(a,b);
puts(a);
getch();
}
void str_cpy(char *str,char *str1)
{
if(str1!='\0')
{
*str=*str1;
str_cpy(++str,++str1);
}
str='\0';
}
thank u
| Is This Answer Correct ? | 8 Yes | 8 No |
Post New Answer View All Answers
using only #include
Why does notstrcat(string, "!");Work?
How can I open files mentioned on the command line, and parse option flags?
What is structure data type in c?
What is identifiers in c with examples?
Where does the name "C" come from, anyway?
How can I discover how many arguments a function was actually called with?
What are the different types of pointers used in c language?
What is the best way to comment out a section of code that contains comments?
What is the use of pointers in C?
Explain modulus operator.
Why is c so popular?
What is meant by errors and debugging?
plz let me know how to become a telecom protocol tester. thank you.
What is c basic?