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
Is it possible to pass an entire structure to functions?
How do I use void main?
What is this infamous null pointer, anyway?
Explain the use of keyword 'register' with respect to variables.
What does char * * argv mean in c?
What are the three constants used in c?
What is the purpose of sprintf() function?
why we wont use '&' sing in aceesing the string using scanf
What is the difference between strcpy() and memcpy() function in c programming?
What is masking?
What is c language and why we use it?
List the different types of c tokens?
Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?
how to construct a simulator keeping the logical boolean gates in c
What is a method in c?