2 Answers
Hi
int val = 7; // can changes as the integer val is used
const int val2 = 9; // never changes as the integer val2 is used, so val2 will always remind 9
Hi Alberto.
I think it is worth taking a look at this discussion: https://forum.arduino.cc/index.php?topic=115386.0#targetText=The%20difference%20between%20int%20and,it%20must%20not%20be%20const.
It explains the difference between int, const int, and #define.
I hope this helps.
Regards,
Sara