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
When should you use a type cast?
Explain the advantages of using macro in c language?
How to get string length of given string in c?
Which are low level languages?
What are high level languages like C and FORTRAN also known as?
How can I sort a linked list?
When should the const modifier be used?
What are different types of variables in c?
Explain what is dynamic data structure?
pgm to find number of words starting with capital letters in a file(additional memory usage not allowed)(if a word starting with capital also next letter in word is capital cann't be counted twice)
What is string in c language?
When is a void pointer used?
Why is %d used in c?
What does c mean in basketball?
What is the main difference between calloc () and malloc ()?