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 / vignesh

@Ramya
const value cannot be changed...you declared it wrong,

int *ptr = &x;

is not correct.It should be,

int ptr = &x;

also,according to your program only the *ptr value is 20 and
not the value of x

Is This Answer Correct ?    5 Yes 51 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the application of void data type in c?

1147


What is c language & why it is used?

1047


What is string constants?

1108


a linearly ordered set of data elements that have the same structure and whose order is preserved in storage by using sequential allocation a) circular b) ordinary c) array d) linear list

1020


Write a program to swap two numbers without using third variable?

1252


Is using exit() the same as using return?

1262


can we change the default calling convention in c if yes than how.........?

2483


What is a header file?

1039


In c programming typeing to occupy the variables in memory space. if not useing the variable the memory space is wasted.ok, how to avoid the situation..? (the variable is used & notused)

2069


Explain 'bit masking'?

1034


Why we not create function inside function.

2148


Give me the code of in-order recursive and non-recursive.

1330


How can my program discover the complete pathname to the executable from which it was invoked?

1039


Is r written in c?

1116


How can I determine whether a machines byte order is big-endian or little-endian?

1016