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...

code for copying two strings with out strcpy() function.

Answer Posted / vignesh1988i

#include<stdio.h>
#include<conio.h>
void str_cpy(char *,char *);
void main()
{
char a[30],b[20];
printf("enter the string to be copied :");
gets(b);
str_cpy(a,b);
printf("the final string is :");
puts(a);
getch();
}
void str_cpy(char *a,char *b)
{
if(*b!='\0')
{
*a=*b;
str_cpy(++a,++b);
}
*a='\0';
}

thank u

Is This Answer Correct ?    6 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How the c program is executed?

1162


What is wrong with this program statement?

1044


How do I get a null pointer in my programs?

1115


Explain the difference between call by value and call by reference in c language?

1115


What are the advantages of c language?

1099


What is the heap in c?

1085


how to find anagram without using string functions using only loops in c programming

3195


What is a program flowchart?

1213


What's the total generic pointer type?

1055


What are qualifiers and modifiers c?

1009


What is null pointer in c?

997


What is enumerated data type in c?

1085


How to throw some light on the b tree?

1091


Explain #pragma statements.

1054


What is void pointers in c?

1010