char string[30];
char *ptr_string;


how do i copy ptr_string and put it into string?

like this?
Code:
string = strdup(ptr_string);
what about the other way?
Code:
ptr_string = strdup(string); ? or  is it
ptr_string= (char *)malloc (strlen(string) * sizeof(char));