ProAnswers.org

write a c program to modify the constant variable in c?

Try this:

Using Pointer You can modify constant variable.

See this example:

#include
int main(){
int i=10;
int *ptr=&i;
*ptr=(int *)20;
printf("%d",i);
}