c change value of const

Solutions on MaxInterview for c change value of const by the best coders in the world

showing results for - "c change value of const"
Neele
29 Jun 2018
1#include<stdio.h>
2#include<stdlib.h>
3int main()
4{
5    const int var = 10;
6  
7    int *ptr = &var;
8    *ptr = 12;
9  
10    printf("var = %d\n", var);
11  
12    return 0;
13}