fastread homefastrread library fastread menu

C : Copy String Without Using strcpy()

Tutorial by:Manisha Dubey      Date: 2016-06-17 04:38:05

❰ Previous Next ❱

You can use the strcpy() function to copy the content of one string to another but, this program copies the content of one string to another manually without using strcpy() function.

Source Code to Copy String Manually

#include <stdio.h>
int main()
    char s1[100], s2[100], i;
    printf("Enter string s1: ");
    for(i=0; s1[i]!='\0'; ++i)
    printf("String s2: %s",s2);
    return 0;


Enter String s1: programiz 
String s2: programiz



This above program copies the content of string s1 to string s2 manually.

❰ Previous Next ❱


Submit Your Thought, Tutorial, Articls etc.

Submit Your Information India's Number one online promotion website