You can modify constant variable with the help of pointers. For example:
#include<iostream>
using namespace std;
void main(){
int i=10;
int *ptr=&i;
*ptr=(int *)20;
cout<<"i"<<endl;
}
Output: 20
#include<iostream>
using namespace std;
void main(){
int i=10;
int *ptr=&i;
*ptr=(int *)20;
cout<<"i"<<endl;
}
Output: 20