Can someone tell me why the first example in C gives a Segmentation fault (core dumped) and the second does not?
805
Why do I get a segmentation fault when writing to a "char *s" initialized with a string literal, but not "char s[]"?
128565
int main() vs void main() in C
27370
2D Arrays and Pointers - C
74858
In C, are arrays pointers or used as pointers?
52821
Why do I get different results when I dereference a pointer after freeing it?
114892
Segmentation fault - char pointer
126241
Structure Problem in C
45814
Crash or "segmentation fault" when data is copied/scanned/read to an uninitialized pointer
3334
What should main() return in C and C++?
33195
Segmentation fault error occurs for a simple function I have coded
43497
Segmentation fault reversing a string literal
36647
Why does printf("%f",0); give undefined behavior?
31433
How do I properly compare strings in C?
153118
Segmentation fault using strcat
82318
What is the difference between char array and char pointer in C?
132674
Printing pointers in C
42576
What is a "callback" in C and how are they implemented?