If I understood correctly, you stored 48, but you see 30 on memory. Please correct me if I understood wrongly.
If so, 30 is hexadecimal value of 48. 0x30 = 48. Please check if there is any confusion caused because of this convention
Hellow Madhu, you have understood correctly , send 48 to be stored and keep me in place 30 , always stores 18 numbers less than the original number. This means that stores the number in hexadecimal ? The code would be right then or can store the decimal value directly ?
Looks like the riddle Why is Halloween exactly the same as Christmas? (Answer: 31Oct = 25Dec)
The computer does not store data in hex or in decimal, both are only a way to represent the stored data or us humans, so that we are able to distinguish different information. You just have to check for yourself
- in which format your number 48 was represented? a decimal?
- in which format did you read back the result, was it in hexadecimal?
So with Madhu's presumption that 0x30 is equal to 48Dec (or equal to '0' in ASCII) your program is running correctly.