This code produces \"p = hello world\":
#include \"stdio.h\" #include \"string.h\" int main(){ char *p; p=\"hello world\"; printf(\"p is %s \\n\",p)
Yes its annoying. You can use strdup to shorten it:
strdup
char *p = strdup("hello"); printf("p is %s \n",p);