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)
There is no free lunch - you need to grab & manage memory. If you just assume that because you have access to a pointer memory should be there then you'll run into unspecified behavior (segfault likely).