Why this code is not running? Why str1 is not assigned to str2 ?? I know i have an option of using strcpy but i wish to know the reason why this is not working??
You may also use strdup() which allocates exact amount of space needed to store a copy.