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

Write a Program to find whether the given number or string is palindrome.

1281


What type of function is main ()?

1046


When was c language developed?

1198


Explain the ternary tree?

1029


Explain what are the advantages and disadvantages of a heap?

1094


Write a program of prime number using recursion.

1096


what is the function of pragma directive in c?

1127


What is calloc in c?

1146


why we wont use '&' sing in aceesing the string using scanf

2373


What is an array in c?

1054


Why c is called a middle level language?

1115


Can variables be declared anywhere in c?

1095


What do you mean by Recursion Function?

1130


What does %c mean in c?

1100


What's the total generic pointer type?

1057