Header Ads Widget

Program to copy string without using strcpy.

#include<stdio.h>
#include<string.h>
void main()
{
      char a[20],b[20],i;
      printf("Enter the string");
      gets(a);
      //logic for copy string
      for(i=0;a[i]!='0';i++)
      {
             b[i]=a[i];
       }
      puts (b);
      getch();
}

Post a Comment

1 Comments

  1. ๐Ÿ‘Œ๐Ÿ‘Œ๐Ÿ‘Œ๐Ÿ‘Œ๐Ÿ‘Œ๐Ÿ‘

    ReplyDelete