STRING COPY


         TO  COPY ONE STRING INTO ANOTHER 





#include<stdio.h>

#include<conio.h>


void main()

   {

       char s1[10],S3[10];int n1=0;

int i,flag;

  printf("Enter 1st string\n");

  scanf("%s",&s1);

   for(i=0;s1[i]!='\0';i++)

       n1++;

for(i=0;i<n1;i++)

  {

     s3[i]=s1[i];

  }

for(i=0;i<n1;i++)

  {

     printf("%c",s3[i]);

  }

printf("\n");

    getch();

   }


No comments:

Post a Comment

If you have any problems related to solutions or any concept please let me know.

Copyright (c) 2020 Custom Programs All Right Reserved

Pages