Hi all,

Suppose i have a char variable pointer, and i allocated memory using malloc. is it different between using strcpy and assigned value directly to this pointer?
Code:
char *s1;
s1 = (char *)malloc(80);

s1 = "Test"                                 //assigned value directly to variable pointer S1
strcpy(s1, "hallo")                      //using strcpy to copy "hallo" to s1
in term of memory, are both use the same memory that has allocated by malloc ??

thanks you for you answer