Skip to main content
Copy Of String In C Program
#include <stdio.h>
//strcpy(arg);
int main()
{
char a[50],b[50],i;
printf("\n Enter the string : ");
scanf("%s",a);
printf("\n Original String : %s",a);
for(i=0;a[i]!='\0';i++)
{
b[i]=a[i];
}
b[i]='\0';
printf("\n Copied string is : %s",b);
return 0;
}
Comments
Post a Comment