C program for copying one String With other String

 #include<stdio.h>

#include<string.h>

int main()

{

    char name[30],name1[30];

    int i;

    printf("\n Enter your name :  ");

    scanf("%s",name);

     for (i=0;name[i]!='\0';i++)

        name1[i]=name[i];

    name1[i]='\0';

    printf("\n Your name is   %s",name1);

}

Comments

Popular posts from this blog

Single Program Using All Automatic String Functions

C program for subtraction of two matrices (2D Arrays)

C program for Multiplication of Two matrices