Answer Posted / vignesh1988i
#include<stdio.h>
#include<conio.h>
void str_cpy(const char *,const char *);
void main()
{
char a[20],b[20];
printf("enter the string for a[] :");
gets(a);
str_cpy(a,b);
printf("\nthe string for b[] is : ");
puts(b);
getch();
}
void str_cpy(const char *a,const char *b)
{
while((*a)^'\0')
{
*b=*a;
*a++;
*b++;
}
*b='\0';
}
thank u
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
Do string constants represent numerical values?
What is pointer & why it is used?
is it possible to create your own header files?
How many types of sorting are there in c?
Why double pointer is used in c?
Why doesnt the call scanf work?
What is quick sort in c?
Explain the term printf() and scanf() used in c language?
Explain how can I pad a string to a known length?
What are the 5 types of organizational structures?
How do you determine whether to use a stream function or a low-level function?
How do I use void main?
write a sorting prgm to sort 50 nos and sum them and also remove all the occurrences of 15 and print it?
Are global variables static in c?
What is property type c?