While I was working on an assignment, I came to know that we should not use assignments such as :
char *s=\"HELLO WORLD\";
Programs using such
String literals are stored in the program's data segment. Manipulating their pointers will modify the string literal, which can lead to... strange results at best. Use strdup() to copy them to heap- or stack-allocated space instead.
strdup()