Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What are the uses of a pointer?

1094


Explain how can I read and write comma-delimited text?

1113


Why should I use standard library functions instead of writing my own?

1204


program to find error in linklist.(i.e find whether any node point wrongly to previous nodes instead of next node)

2044


What does main () mean in c?

1055


Is a pointer a kind of array?

1113


What is malloc return c?

973


any "C" function by default returns an a) int value b) float value c) char value d) a & b

1041


What is hungarian notation? Is it worthwhile?

1167


how to create duplicate link list using C???

2501


Was 2000 a leap year?

1002


What are the advantages and disadvantages of c language?

961


Explain high-order bytes.

1060


How can I insert or delete a line (or record) in the middle of a file?

975


What is volatile keyword in c?

996