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

a small modification to answer #13

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

*(int *)&a=25
printf("%d\n",a);
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 is the difference between class and unio?

2369


If I have a char * variable pointing to the name of a function ..

1176


I need a help with a program: Write a C program that uses data input in determining the whole of points A and a whole of circles B. Find two points in A so that the line which passes through them, cut through the maximum number of circles.

1948


What is the purpose of void pointer?

1036


any function have arguments one or more OR not . it is compulsary a) any function compulsary have one or more arguments b) any function did not have arguments. It is not compulsary c) it is optional it is not compulsary d) none of the above

1127


Is it possible to initialize a variable at the time it was declared?

1221


If null and 0 are equivalent as null pointer constants, which should I use?

1225


What does emoji p mean?

1122


Which is an example of a structural homology?

1328


Can you add pointers together? Why would you?

1130


int i=10; printf("%d %d %d", i, i=20, i);

1626


How do I use strcmp?

1082


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

1174


A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers

1206


What is main () in c?

1078