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

What is C language ?

1917


Are there namespaces in c?

1072


What are the 5 types of inheritance in c ++?

983


How variables are declared in c?

1007


What's the best way of making my program efficient?

1049


Which function in C can be used to append a string to another string?

1184


What is getch() function?

1020


Where we use clrscr in c?

1106


What is a wrapper function in c?

1084


How many identifiers are there in c?

978


What are identifiers and keywords in c?

1050


provide an example of the Group by clause, when would you use this clause

2145


Write a program to implement queue.

1080


How does pointer work in c?

1091


a formula,a series of steps,or well defined set of rules for solving a problem a) algorithem b) program c) erdiagram d) compiler

1042