I've been trying to better understand C strings and I got through this question (Is it possible to modify a string of char in C?) explaining the difference between the following two declarations of a string.
char *a = "This is a string";
char b[] = "This is a string";
Now, if I have function to process a string such as:
int process_string(char *x);
Is there a way to determine whether x
could be modified inside the function? Can I determine whether x
points to read-only or modifiable memory space at runtime?