c change value of const

#include <stdio.h>

int main() {
    const int x = 5;
    int ptr = (int)&x;

    *ptr = 10;

    printf("New value of x: %d\n", x);

    return 0;
}