programming9
  • Flowcharts
  • Programs
      • Back
      • C Programs
      • C++ Programs
      • Java Programs
      • Python Codes
      • HTML Codes
      • Java Script Codes
      • SQL Codes
  • Tutorials
      • Back
      • Java Tutorials
      • Competitive Programming
      • Python Tutorials
      • C Programming
  • Blog
  • Login

C Program to Copy a String with out using strcpy() Built in Function

Details
Written by: RajaSekhar
Category: C Programs
  • C Functions
  • C Program
  • strcpy
#include <string.h>
#include <conio.h>
#include <stdio.h>
void main()
{
    int i,j,len=0;
    char src[50],dest[50];
    clrscr();
    printf("\n Enter a String to Copy : " );
    gets(src);
    for(i=0; src[i]!='\0'; i++)
    {
        dest[i]=src[i];
    }
    dest[i]='\0';

    printf("\n String is Successfully copied and it is : %s ",dest);
    free(src);
    getch();
}

 OUTPUT:

Enter a String to Copy : Programming9

String is Successfully copied and it is : Programming9
Previous article: C Program for String Comparison without using Built in Function Prev Next article: C Program to Find String Length with out using Function Next
  • C Program to Reverse Elements in Array
  • C Program to Find Sum of Individual Digits of a Positive Integer Number
  • C Program to Search an Array Element using BINARY SEARCH
  • C Program to Find Given Integer is Positive or Negative
  • C Program for Insertion Sort
  • Finding GCD and LCM of Given Numbers using C
  • C Program to ADD two MATRICES
  • C Program to Print Reverse of a String without strrev() function
  • C Program for Arithmetic Operations using Switch Statement
  • C Program for Implementation of Predictive Parser
  • C Program to Copy Contents From One File to Another
  • C Program to Find the Prime Numbers
  • C Program to Implement Structure with Pointers
  • C Program to Find Smallest Element in the Array
  • Compute Factorial of Large Numbers using C
  • Privacy Policy
  • Cookie Policy
© programming9.com 2026
Back to top