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
  • Merge Sort Program in C
  • C Program to Calculate Sum of Even Values in an Array
  • C Program to find an Element using Binary Search
  • C Program to Sort an Array using SELECTION SORT
  • C Program Example for Call By Reference
  • C Program for Circumference of a Circle
  • C Program for String Comparison without using Built in Function
  • C Program to Implement Doubly Linked List Operations
  • C Program to Find Largest Element in an Array
  • C Program for Fibonacci Series using While Loop
  • C Program to Find Factorial of a Number using Recursion
  • C Program to Find Area of a Square
  • C Program to Implement RADIX SORT
  • C Program to Compare Two Strings using strcmp()
  • C Program for Call By Reference
  • Privacy Policy
  • Cookie Policy
© programming9.com 2026
Back to top