Answers for "how to change value of const int in c"

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 = %dn", var);
  
    return 0;
}
Posted by: Guest on September-14-2021

Code answers related to "C"

Browse Popular Code Answers by Language