 Hello friends. I am Sanjay Gupta. In this video I am going to demonstrate you how you can modify value of a constant variable in a C programming. Before starting, you can note how you can search my YouTube channel. You can type my name Sanjay Gupta in YouTube search bar. My channel will be available there. You can watch various programming related videos here. Do not forget to subscribe my channel. You can follow me by subscribing my YouTube channel. Now I am going to implement a code in C programming so that I can demonstrate you how you can modify value of a constant variable. So inside main function, I am declaring a variable A and it is initialized with 10. So I can print its value on console using this printf statement. Now I can assign 20 into 8 and then with the help of printf, I can print modified value of a on console using this printf statement. And then I can write return 0. So this way first value of a will be printed 10 and then it will be converted into 20. Then second output will be printed as 20. Now I am executing this code. You can see the output value of face 10. Then after modifications value has become 20. Now I am declaring this A variable as constant. So constant variables receives a value at the time of their creation. We cannot modify value of a variable who is declared as constant. So now if I compile this code, it will show a compilation error. You can see this assignment of read only variable A. So A is declared as constant. So I cannot modify value of a variable. So this time compiler is showing an error. Now how I can overcome this error. So for that purpose, I am declaring a pointer of integer type. I am assigning address of A variable into P. So address of A is typecasted into integer pointer and then it is received inside P pointer. Now I am removing A from here and I am writing asterisk P equals to 20. So P is containing address of A. So this asterisk symbol will provide its value. So I am modifying value of A through this pointer P. Asterisk P means I am assigning 20 into the address which is denoted through A. So this way with the help of these printf, I am printing again value of A. So I have modified value of A through the pointer. So directly I am not modifying value of A, but through its address with the help of pointer, I am modifying value of A. Now I am executing this code. You can see no error message is displayed this time and value of A is 10 then modified value of A is 20. So this way using pointer, you can modify value of constant variable through its address. So I hope you have understood the concept how you can modify the value of constant variable in C programming. You can watch more programming related videos. For that you can search my name Sanjay Gupta in YouTube. My channel will be available there. You can watch various programming related videos there. Do not forget to subscribe my YouTube channel. Thank you for watching this video.