How to access or modify the const variable in c ?
Answer Posted / sri harsha s
Its compiler dependant.
Using pointer you can modify the content of a 'const'
variable. It works in gcc.. you will get the following
warning when you compile that program.
warning: initialization discards qualifiers from pointer
target type.
I am not sure about turbo c++.
Is This Answer Correct ? | 9 Yes | 1 No |
Post New Answer View All Answers
If errno contains a nonzero number, is there an error?
What is typedef example?
What is the sizeof () operator?
What is volatile variable in c with example?
Why do we need a structure?
What is #define?
Can you mix old-style and new-style function syntax?
What is declaration and definition in c?
Why pointers are used?
a sequence of bytes with one to one corrspondence to those in the external device a) sequential addressing b) address c) byte code d) none
What is the collection of communication lines and routers called?
Explain what is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
How do you initialize pointer variables?
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
Explain how can I avoid the abort, retry, fail messages?