Computer Science, asked by Sony2004, 1 year ago

write a C program to modify the constant variable

Attachments:

Answers

Answered by siddhartharao77
2
#include<stdio.h>

void main()
{   

  const int i=10;

    int *ptr = &i;

    *ptr = (int *)20;

    printf("%d",i);

    return 0;

}


 Output: 20.


Hope this helps!
Similar questions