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
An organised method of depicting the use of an area of computer memory used to signify the uses for different parts of the memory a) swap b) extended memory c) memory map d) all of the above
What is difference between && and & in c?
which type of aspect you want from the student.
What is structure of c program?
pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)
what is the c source code for the below output? 10 10 10 10 10 10 10 10 10 10 9 9 7 6 6 6 6 6 6 9 7 5 9 7 3 2 2 5 9 7 3 1 5 9 7 3 5 9 7 4 4 4 4 5 9 7 8 8 8 8 8 8 8 8 9
any "C" function by default returns an a) int value b) float value c) char value d) a & b
What is a pointer in c?
What is the full form of getch?
what is the height of tree if leaf node is at level 3. please explain
int far *near * p; means
What are the 5 types of inheritance in c ++?
Explain what is page thrashing?
Was 2000 a leap year?
What should malloc(0) do? Return a null pointer or a pointer to 0 bytes?