How will you modify a const variable in C

void main(){
    const int a=10;
    int *ptr=(int *)&a;
    *ptr=20;
    clrscr();
    printf("%d",a);
    getch();
}
 
Output: 20

Comments

Popular posts from this blog

Customize User's Profile in ASP.NET Identity System

Migrating database from ASP.NET Identity to ASP.NET Core Identity