For example, #define MAX 32767 // such a MAX constant is defined by a macro.
Const int MAX 32767// The integer constant MAX is defined by the const keyword modifier.
const float PAI 3. 14 15926; //The floating-point constant PAI is defined by the const keyword modifier.
char * const ptr = 0x 12345678; //Pointer constants are defined by const keyword modifiers.
In addition to the above, the legal identifiers seen in C language except function names and keywords are all variable identifiers.
Difference: A constant is a quantity, and its value can be set at the time of definition (except for numerical constants), but its value cannot be changed at any time thereafter.
A variable is a quantity whose value can be changed at any time after it is defined.
I hope the above answers are helpful to you. Good luck!