I'm learning C mostly for linux development, but right now I am working through a few general books to get me started. But I am having some problems understanding #define versus declaring a variable directly(?). I know that #define declares a constant, but for example normally I would declare a variable as a specified type like int Celsius; and then later could assign it a value. But with #define as it's written in the book I'm reading I wouldn't declare the variable as anything specific:
#define CELSIUS 20
So later in code it automatically gets converted to a int right? For example:
int celsius;
for (CELSIUS = LOWER; CELSIUS <= UPPER; CELSIUS = CELSIUS + STEP)
...
Seems to me this could cause problems not only on future readability, but wouldn't it also lead to bad programming habits? Maybe I've taken all this out of context. Either way, can someone please explain to me what exactly is the difference?