10 February 2022

Function - strcpy()

 


#include<stdio.h>
#include<string.h>

int main()
{
    char *st = "Nandkishor";

    char name[15];

    strcpy(name,st);    //This function is used to copy first string into second
                        // or vice versa

    printf("Now the name is %s", name);
 
return 0;
}

OUTPUT--->

Now the name is Nandkishor

No comments:

Post a Comment