Program to Copy one string into other without using string function in C Programming



//Copy one string into other without using string function
//www.lernc.blogspot.com
#include
#include

main()
{
int i;
char a[15],b[15];
clrscr();
i=0;
printf("\n Input a string \n");
scanf("&s",a);
while(a[i]!='\0')
{
b[i]=a[i];
i++;
}
b[i]='\0';
printf("\n Copied string is %s",b);
}

//www.lernc.blogspot.com


http://www.lernc.blogspot.com

No comments:

Post a Comment