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

How can you tell whether two strings are the same?

1251


What is zero based addressing?

1168


What is use of #include in c?

1160


What is null in c?

1087


An application package has been provided to you without any documents for the following application. The application needs to be tested. How will you proceed?

1230


a value that does not change during program execution a) variabe b) argument c) parameter d) none

1236


The performance of an operation in several steps with each step using the output of the preceding step a) recursion b) search c) call by value d) call by reference

1221


why return type of main is not necessary in linux

2104


In which header file is the null macro defined?

1341


Why is struct padding needed?

1083


Tell me about low level programming languages.

1121


What is structure in c definition?

1044


What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file

1108


WHAT IS THE DEFINATION OF IN TECHNOLOGY AND OFF TECHNOLOGY ?

2377


When reallocating memory if any other pointers point into the same piece of memory do you have to readjust these other pointers or do they get readjusted automatically?

1269