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

how to copy a string without using c function

Answer Posted / ruchi

#include<stdio.h>
#include<conio.h>
int main()
{
char a[40],b[40];
int i=0,c,j;
printf("\nEnter the first string ");
while((a[i++]=getchar())!='\n');
for(c=0;c<i;c++)
{
b[c] = a[c];
}

for(j=0;j<i;j++)
{
printf("%c",b[j]);
}
getch();
}

Is This Answer Correct ?    3 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the output(s) for the following ? #include char *f() {char *s=malloc(8); strcpy(s,"goodbye")} main() { char *f(); printf("%c",*f()='A'); }

1165


What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?

1318


Write a program to generate random numbers in c?

1083


Is fortran still used today?

1083


How can I access an I o board directly?

1079


What is main function in c?

1066


What is the difference between struct and typedef struct in c?

1114


What is the purpose of sprintf() function?

1101


What are the advantages of c preprocessor?

1241


What is the easiest sorting method to use?

1143


When was c language developed?

1181


can we change the default calling convention in c if yes than how.........?

2521


What is the value of uninitialized variable in c?

1019


What is the purpose of void pointer?

1016


What do you understand by friend-functions? How are they used?

1193