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 is the difference between new and malloc functions?

1072


about c language

1971


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

3155


What does %p mean c?

1026


What is selection sort in c?

1035


which of the following statement is wrong a) mes=123.56; b) con='T'*'A'; c) this='T'*20; d) 3+a=b;

3182


What is function pointer c?

1052


There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?

1256


Who is the main contributor in designing the c language after dennis ritchie?

967


What is the use of getchar() function?

1089


What are the string functions? List some string functions available in c.

955


What are the usage of pointer in c?

1147


What is the use of define in c?

1022


How can I remove the leading spaces from a string?

1113


What is nested structure with example?

1036