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
What are disadvantages of C language.
Do you know the use of fflush() function?
Differentiate between full, complete & perfect binary trees.
Why can't I perform arithmetic on a void* pointer?
how is the examination pattern?
What are the 5 elements of structure?
What is a struct c#?
Write an algorithm for implementing insertion and deletion operations in a singly linked list using arrays ?
What is meant by type specifiers?
What the advantages of using Unions?
What is wrong in this statement?
How pointers are declared?
Write a program to implement a round robin scheduler and calculate the average waiting time.Arrival time, burst time, time quantum, and no. of processes should be the inputs.
Do you know the purpose of 'register' keyword?
What is the use of linkage in c language?