Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

write a string copy function routine?

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


Please Help Members By Posting Answers For Below Questions

What are disadvantages of C language.

1119


Do you know the use of fflush() function?

1021


Differentiate between full, complete & perfect binary trees.

1061


Why can't I perform arithmetic on a void* pointer?

1062


how is the examination pattern?

1971


What are the 5 elements of structure?

1047


What is a struct c#?

1005


Write an algorithm for implementing insertion and deletion operations in a singly linked list using arrays ?

3467


What is meant by type specifiers?

1092


What the advantages of using Unions?

1174


What is wrong in this statement?

1096


How pointers are declared?

921


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.

1062


Do you know the purpose of 'register' keyword?

976


What is the use of linkage in c language?

1019