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
What are the uses of a pointer?
Explain how can I read and write comma-delimited text?
Why should I use standard library functions instead of writing my own?
program to find error in linklist.(i.e find whether any node point wrongly to previous nodes instead of next node)
What does main () mean in c?
Is a pointer a kind of array?
What is malloc return c?
any "C" function by default returns an a) int value b) float value c) char value d) a & b
What is hungarian notation? Is it worthwhile?
how to create duplicate link list using C???
Was 2000 a leap year?
What are the advantages and disadvantages of c language?
Explain high-order bytes.
How can I insert or delete a line (or record) in the middle of a file?
What is volatile keyword in c?