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 Sub String Position in Given String
  • C Program to Print Addresses of Variables
  • C Program to Check Given Number is PRIME or Not
  • C Program Example for Call By Reference
  • C Program to Compare Two Strings using strcmp()
  • C Program to Simulate PRIORITY CPU Scheduling Algorithm
  • C program to Implement BREAK Statement
  • C Program to Find Area of Rectangle
  • C Program for Monthly Bill of a Newspaper
  • C Program to Implement Single Linked List Operations
  • C Program for Call By Reference
  • C Program to Find Number of Characters and Words in a String
  • C Program to Find Sum of Individual Digits of a Positive Integer Number
  • C Program to convert Celsius to Fahrenheit
  • Privacy Policy
  • Cookie Policy
© programming9.com 2026
Back to top