String C Tutorial

We must use the standard library function strcpy to copy the string constant into the variable.
To initialize the variable name to Sam.

#include     
    int main() 
    {  
        char    name[4];   
        strcpy(name, "Sam");
        return (0);    
    }