I have a small piece of code written in C language. In that code I have a variable named "k" whose value I want to modify but here is the problem. According to my program, the value of k should be changed but it doesn't changes at all. I thought of displaying the value of k after each changes so that I can keep track of its value. I noticed that after first statement and printing k, the value was 50. Now I have the statement where k changes to product of other 2 numbers and the result is assumed to be 560 but when I print k, the value remains 50. Why is that so? Why my k is unmodifiable even after changes?
Bookmarks