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?

Answers were Sorted based on User's Feedback



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

Answer / 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

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

Answer / j j ramesh

void main()
{
char str1[100],str2[100];
printf("ENTER THE STRING :");
gets(str1);
for(i=0;str1[i];i++)
str2[i] = str1[i]l
pritf("COPIED : %s",str2);
}

Is This Answer Correct ?    4 Yes 1 No

Post New Answer

More C Interview Questions

What are header files? What are their uses?

0 Answers  


int main() { Int n=20,i; For(i=0;i<=n;i--) { Printf(“-“); Return 0;

0 Answers  


What is the time and space complexities of merge sort and when is it preferred over quick sort?

0 Answers   Amazon,


What is alloca() and why is its use discouraged?

1 Answers  


What is the difference between volatile and const volatile?

0 Answers  


What are types of preprocessor in c?

0 Answers  


a construct the"else" part of "if" statement contains anoth "if else" statement is called a) if-else b) else-if-else c) if-else-if-else d) chain if/if-else-if

0 Answers  


EXPLAIN #INCLUDE<STDIO.H> EXPLAIN #INCLUDE<CONIO.H>

4 Answers  


Write a c program to enter a string of paragraph and replacing a particular word which is repeated in the paragraph by another word?

2 Answers   ME, Synfusion, Wipro,


how to find out the reverse number of a digit if it is input through the keyboard?

6 Answers  


why to assign a pointer to null sometimes??how can a pointer we declare get assigned with a garbage value by default???

0 Answers  


/*program to calculate hra,da in salary if salary less than 10000 then hra15%,da13% otherwise hra20%,da18%/*

6 Answers  


Categories