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 that takes a 5 digit number and calculates 2 power that number and prints it(should not use big integers and exponential functions)

6726


What is double pointer?

949


What is the meaning of 2d in c?

1064


In which layer of the network datastructure format change is done

1836


How will you find a duplicate number in a array without negating the nos ?

2082


Discuss the function of conditional operator, size of operator and comma operator with examples.

1097


What is fflush() function?

1079


Write the program that calculates and prints the average of several integers. Assume that the last value read is sentinel 9999.

3636


illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question

2022


Can we assign integer value to char in c?

1157


How is = symbol different from == symbol in c programming?

984


What is pass by value in c?

1005


Subtract Two Number Without Using Subtraction Operator

781


What is the purpose of clrscr () printf () and getch ()?

1023


Write a program to check armstrong number in c?

1082