by Dinesh Thakur Category: C Programming (Pratical)

This is c program that user has to show how to enter the content through string copy function. User declare array type variable so that use to contain the data in it. Here user declares the strcpy function to initialize the name as content. In the last user display the print method to show the output in result.

Problem statement:
This is C program to define the String copy function.

  1. Declare the variables.
  2. Using function.
  3. Display result on the screen.

Here is C source code to enter through string function. The output of this program shown below.

#include <string.h>
#include <stdio.h>
char name[30];    /* First name of someone */
int main()
    strcpy(name, "Sam");    /* Initialize the name */
    printf("The name is %s\n", name);
    return (0);

Write a Program with Enter Through Strcpy

About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.C.A, MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.