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

write a program to copy a string without using a string?

Answer Posted / balaji ganesh

#include<stdio.h>
#include<string.h>
void main()
{
char a[50],b[50];
int i,n=0;
clrscr();
printf("enter a string:");
while((a[n]=getchar())!='\n')
{
b[n]=a[n++];
}
for(i=0;i<n;i++)
printf("%c",b[i]);
getch();
}

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I access an I o board directly?

1089


If the size of int data type is two bytes, what is the range of signed int data type?

1018


diff between exptected result and requirement?

2048


What is difference between stdio h and conio h?

1367


What are the advantage of c language?

1050


What are the types of type qualifiers in c?

1083


What is operator precedence?

1200


What is type qualifiers?

1130


Linked lists -- can you tell me how to check whether a linked list is circular?

1080


What is a function in c?

1573


How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?

1026


what is the basis for selection of arrays or pointers as data structure in a program

4305


writ a program to compare using strcmp VIVA and viva with its output.

2014


What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?

1227


What is the difference between far and near in c?

1065