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

write a c program to do the following: a) To find the area of a triangle. b) To convert the temperature from Fahrenheit to Celsius. c) To convert the time in hours : minutes : seconds to seconds.

1947


Write the Program to reverse a string using pointers.

971


Explain what is wrong in this statement?

1070


How can I avoid the abort, retry, fail messages?

1086


Difference between Shallow copy and Deep copy?

1971


What is scope rule of function in c?

1031


What is the purpose of the statement: strcat (S2, S1)?

1080


What is a macro, and explain how do you use it?

1021


How a string is stored in c?

1019


What is a pointer and how it is initialized?

1085


Explain what is meant by high-order and low-order bytes?

1002


Explain what is the most efficient way to store flag values?

1176


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

1121


List out few of the applications that make use of Multilinked Structures?

2114


What is the scope of an external variable in c?

985