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

write a program to print data of 5 five students with structures?

0 Answers  


Was 2000 a leap year?

0 Answers  


What is difference between constant pointer and constant variable?

0 Answers   Hexaware,


Write a program in C for showing working of different logical operator in C. Your program should guide users with proper message/menu on the console.

3 Answers   HCL,


What is the deal on sprintf_s return value?

0 Answers  


Differentiate between null and void pointers.

0 Answers   TCS,


number of times a digit is present in a number

0 Answers  


write a program in c language for the multiplication of two matrices using pointers?

8 Answers   Ignou,


Is it better to use malloc() or calloc()?

0 Answers   Aspire, Infogain,


main() { intx=2,y=6,z=6; x=y=z; printf(%d",x) }

5 Answers   Amazon, HCL, Thought Works,


Mention four important string handling functions in c languages .

0 Answers  


Write a C program to find the smallest of three integers, without using any of the comparision operators.

7 Answers   TCS,


Categories