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 is the difference between variable declaration and variable definition in c?
What do you mean by a sequential access file?
What are the different types of C instructions?
How do you convert strings to numbers in C?
write a proram to reverse the string using switch case?
What is static and auto variables in c?
What is a macro in c preprocessor?
Find the second largest element in an array with minimum no of comparisons and give the minimum no of comparisons needed on an array of size N to do the same.
how logic is used
I need a sort of an approximate strcmp routine?
How to find a missed value, if you want to store 100 values in a 99 sized array?
What does sizeof return c?
Write a program to print "hello world" without using a semicolon?
What is extern storage class in c?
What type is sizeof?