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
What is p in text message?
Why static is used in c?
What is the difference between struct and union in C?
Why C language is a procedural language?
What is difference between arrays and pointers?
What are the advantages of using Unions?
Difference between constant pointer and pointer to a constant.
Why are algorithms important in c program?
Why isn't it being handled properly?
What is array in c with example?
What is nested structure in c?
List the difference between a "copy constructor" and a "assignment operator"?
What is scope of variable in c?
Explain what is the difference between functions abs() and fabs()?
Explain the difference between the local variable and global variable in c?