How to access or modify the const variable in c ?
Answer Posted / saneesh a t
Actually the keyword const is not for the programmer who work with the normal
general purpose computer. By declaring a variable as const, the compailar shows
warning/error to the modification to the variable. At runtime you can modify the memory location
using any technique, or an external hacking program can change the value of the variable.
Suppose your program is compiled to run with a microcontroller with flash or EEPROM or such
memory. Now your variable with const qualifier will be stored in the FLASH of EEPROM memory,
which cann't be modified, and the technique is used to save the RAM space which is too small in
size for a micro controller. In this case too, a FLASH/EEPROM write can chage the value of the
const varriable.
| Is This Answer Correct ? | 17 Yes | 1 No |
Post New Answer View All Answers
Why ca not I do something like this?
What is void pointers in c?
how to introdu5ce my self in serco
What does printf does?
What are the types of c language?
What is a method in c?
What’s a signal? Explain what do I use signals for?
What is the -> in c?
What functions are used in dynamic memory allocation in c?
What are types of structure?
int far *near * p; means
Why is c called a mid-level programming language?
write a C program: To recognize date of any format even formats like "feb-02-2003","02-february-2003",mm/dd/yy, dd/mm/yy and display it as mm/dd/yy.
Why is c so important?
What are the uses of null pointers?