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

how many key words availabel in c a) 28 b) 31 c) 32

1129


What is file in c preprocessor?

1199


Is int a keyword in c?

1039


What is build process in c?

1206


How to explain the final year project as a fresher please answer with sample project

1027


Explain how do you declare an array that will hold more than 64kb of data?

1500


What is calloc malloc realloc in c?

1108


How would you obtain the current time and difference between two times?

1339


Can you please explain the difference between exit() and _exit() function?

1086


Write a C Program That Will Count The Number Of Even And Odd Integers In A Set using while loop

2210


What are header files in c?

1122


Explain zero based addressing.

1099


What is the difference between a string and an array?

1260


When should a type cast be used?

1065


Why is main function so important?

1163