Well there are pointers to memory you can't change, such as
char *A = "Slackware";
Which should be declared as const to begin with.
Code:
$ cat foo.c
#include <stdio.h>
#include <stdlib.h>
int main()
{
char *A = "Slackware";
puts(A);
return 0;
}
$ gcc -Wall -Wextra -Wwrite-strings foo.c
foo.c: In function ‘main’:
foo.c:5:15: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
5 | char *A = "Slackware";
| ^~~~~~~~~~~
Then there are pointers to memory you can change.
Code:
$ cat foo.c
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main()
{
char *A = malloc(20);
strcpy(A,"Slackware");
A[5] = '\0';
puts(A);
free(A);
return 0;
}
$ gcc -Wall -Wextra -Wwrite-strings foo.c
$ ./a.out
Slack