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

try this it will work:

#include<stdio.h>
int main()
{
const int i=10;

*(int *)&i=i++;
printf("%d\n",i);

return 0;
}

Is This Answer Correct ?    3 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are run-time errors?

1179


An instruction which is analysed and acted upon by the processor prior to the compiler going its work a) directive b) constructive c) constant d) absolute mode

1149


Why header files are used?

1169


‘SAVEPOINT’ and ‘ROLLBACK’ is used in oracle database to secure the data comment. Give suitable examples of each with sql command.

2389


will u please send me the placement papers to my mail???????????????????

1888


please give me some tips for the placement in the TCS.

2161


Why is c so powerful?

1165


Explain 'bus error'?

1166


what do u mean by Direct access files? then can u explain about Direct Access Files?

2148


What is the difference between array and structure in c?

1246


Explain the advantages and disadvantages of macros.

1142


Can you tell me how to check whether a linked list is circular?

1498


what is uses of .net

1788


p*=(++q)++*--p when p=q=1 while(q<=6)

1816


Why can’t we compare structures?

1327