Lets see how can we copy a source string to destination string without using library functions.
Code
#include<stdio.h>
int main()
{
char source[20],dest[20];
int i;
printf("\nEnter source string : ");
gets(source);
for(i=0;source[i]!='\0';i++)
dest[i] = source[i];
dest[i] = '\0';
printf("\nCopied String = %s",dest);
return 0;
}
No comments:
Post a Comment