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
What is hashing in c?
What are the header files used in c language?
Explain the advantages and disadvantages of macros.
When should a type cast not be used?
How can I determine whether a machines byte order is big-endian or little-endian?
Can a pointer be null?
Which is better malloc or calloc?
how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12
What is indirection in c?
What is the purpose of clrscr () printf () and getch ()?
What is %s and %d in c?
What is the difference between abs() and fabs() functions?
a direct address that identifies a location by means of its displacement from a base address or segment a) absolute address b) relative address c) relative mode d) absolute mode
List some of the dynamic data structures in C?
The postoder traversal is 7,14,3,55,22,5,17 Then ur Inorder traversal is??? please help me on this