I am learning some new things and get stuck on a simple strcpy operation. I don't understand why first time when I print works but second time it doesn't. #include #include #include int main() { char *name; char *altname; name=(char *)malloc(60*sizeof(char)); name="Hello World!"; altname=name; printf("%s \n", altname); altname=NULL; strcpy(altname,name); printf("%s \n", altname); return 1; } Solved You need to allocate memory for altname : #include #include #include int main() { char *name; char *altname; name=(char *)malloc(60*sizeof(char)); name="Hello World!"; altname=name; printf("%s \n", altname); altname=NULL; // allocate memory, so strcpy has space to write on ;) altname=(char *)malloc(60*sizeof(char)); strcpy(altname,name); printf("%s \n", altname); return 1; } The problems star...