We can modify the const variable with the help of pointer.void main(){ const int a=10; int *ptr=(int *)&a; *ptr=20; clrscr(); printf("%d",a); getch();}Output: 20
the o/p is not 20 its 10
ans is 20.
the o/p is not 20 its 10
ReplyDeleteans is 20.
Delete