Answers for "c change value of const"

C
0

c change value of const

#include<stdio.h>
#include<stdlib.h>
int main()
{
    const int var = 10;
  
    int *ptr = &var;
    *ptr = 12;
  
    printf("var = %d\n", var);
  
    return 0;
}
Posted by: Guest on September-14-2021

Code answers related to "C"

Browse Popular Code Answers by Language