Write a ‘C’ program to copy one string into another string without using standard function

#include<stdio.h>
#include<conio.h>
void main()
{
int i=0;
char s1[10],s2[10];
clrscr();
printf("\n enter the string 1 \n");
gets(s1);
printf("\n enter the string 2\n");
gets(s2);
printf("\n string 1:-%s",s1);
printf("\n string 2:-%s",s2);
while(s1[i]!=NULL)
{
s2[i]=s1[i];
i++;
}
s2[i]='\0';
printf("\n After copy the string2= %s",s2);
getch();
}

5 comments:

  1. plz help to find the code without using string function that display reverse output
    like....... i like pakistan
    the output will pakistan like i

    ReplyDelete
    Replies
    1. No....i like Pakistan the output is Full World Hate Pakistan... !!!

      Delete
  2. This comment has been removed by the author.

    ReplyDelete
  3. The sales lead follow up article is very much point base and there are all details and crm management software important aspect counted about CRM. The point is very clear and the tool is already known to create all buzz in the market. There are custom crm development serious and higher end benefits found to work for the CRM tool. For every business it is something that is proving quite a dealer crm worth.

    ReplyDelete