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
What are the disadvantages of a shell structure?
What is the scope of static variable in c?
general for is %wd,f-d; in this system "w" means a) 'w' represent total width of digits b) 'w' represent width which includes the digits before,after decimal place and the decimal point c) 'w' represent width which includes the digits before only d) 'w' represent width after decimal place only
How can I use a preprocessorif expression to ?
Write a program to reverse a string.
how to make a scientific calculater ?
Does c have function or method?
int i[2], j; int *pi;i[0] = 1; i[1] = 5; pi = i; j = *pi + 1 + *(pi + 1)Value of j after execution of the above statements will be a) 7 b) 6 c) 4 d) pointer
What is c preprocessor mean?
When should a type cast not be used?
How will you declare an array of three function pointers where each function receives two ints and returns a float?
Why static variable is used in c?
How many bytes is a struct in c?
What is meant by int main ()?
Explain what is the benefit of using an enum rather than a #define constant?