The reason for this warning is that const in c doesn’t mean constant. It means “read only”. So the value is stored at a memory address and could potentially be changed by machine code.
More Related Contents:
- C | Static array: why does writing out-of-bounds not result in exception? [duplicate]
- Can a const variable be used to declare the size of an array in C?
- What is the purpose of static keyword in array parameter of function like “char s[static 10]”?
- Why am I being allowed to use a const qualified variable as an array size in C?
- variably modified array at file scope in C
- Why can’t the size of a static array be made variable?
- What is the difference between static const and const?
- Access element of array of pointer of structure
- Explanation of output of this C code
- whats the difference between dynamic memory allocation and normal memory allocation?
- Getting an error while running following code
- Finding target sum of two numbers in array
- Correctly allocating multi-dimensional arrays
- C sizeof a passed array [duplicate]
- How to deal with symbol collisions between statically linked libraries?
- Array-size macro that rejects pointers
- Constant pointer vs Pointer to constant [duplicate]
- How to initialize array to 0 in C?
- Difference between char* and const char*?
- Is returning a pointer to a static local variable safe?
- Convert Bytes to Int / uint in C
- Objective C: SHA1
- What is double star (eg. NSError **)?
- Find the Size of integer array received as an argument to a function in c [duplicate]
- How to include a dynamic array INSIDE a struct in C?
- How can I return a character array from a function in C?
- C difference between *[] and **
- Finding out the duplicate element in an array
- Exceeding array bound in C — Why does this NOT crash?
- Convert char array to string use C