I HATE SIGSEGV. Why is C programming so much harder than all the other langs? (don't answer that).
Anyway look at the following:
There is no manipulation of p during ... . I've also triedCode:int main (void) { char* p = "hello"; ... printf("\n %s.", p); return 0; }
printf(" %s ", *p);
======================
char p[] = "hello";
printf(" %s ", p); OR printf(" %s ", *p);
All of the above gave me a segmentation fault.
What is wrong? Please? I'm slowly giving up hope of ever learning C. I took a course in JAVA in school and was at the top of the class, but memory and string operations in C are SOOOOOO confusing.