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
Explain how do you use a pointer to a function?
Q.1 write aprogram to stack using linklist o insert 40 items? Q.2 write a program to implement circular queue with help of linklist?
How can I make sure that my program is the only one accessing a file?
write a C program: To recognize date of any format even formats like "feb-02-2003","02-february-2003",mm/dd/yy, dd/mm/yy and display it as mm/dd/yy.
What are 3 types of structures?
plz let me know how to become a telecom protocol tester. thank you.
Given two strings S1 and S2. Delete from S2 all those characters which occur in S1 also and finally create a clean S2 with the relevant characters deleted.
Implement bit Array in C.
A c program to display count values from 0 to 100 and flash each digit for a secong.reset the counter after it reaches 100.use for loop,. pls guys hepl me.. :(
Explain what are the __date__ and __time__ preprocessor commands?
illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question
What is structure in c definition?
Why isn't it being handled properly?
What is self-referential structure in c programming?
What is difference between arrays and pointers?