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
can any one please explain, how can i access hard disk(physical address)? it is possible by the use of far,near or huge pointer? if yes then please explain......
Why c is called top down?
What is the default value of local and global variables in c?
How do you do dynamic memory allocation in C applications?
What is array of structure in c programming?
This is a variation of the call_me function in the previous question:call_me (myvar)int *myvar;{ *myvar += 5; }The correct way to call this function from main() will be a) call_me(myvar) b) call_me(*myvar) c) call_me(&myvar) d) expanded memory
how many key words availabel in c a) 28 b) 31 c) 32
What are actual arguments?
When should we use pointers in a c program?
What is difference between constant pointer and constant variable?
List some of the dynamic data structures in C?
What is an operator?
Tell us bitwise shift operators?
What is void main ()?
What is pointer to pointer in c language?