I do not understand main difference between constant and define and I am having difficulty to understand specific use
define keyword
constant keyword tell to compiler that value of variable can't be change
somebody can explain When we should really use constant and define keyword in code ?
define keyword
C:
#include <stdio.h>
#define x 20
int main(void)
{
printf("x = %d \n", x);
return 0;
}
C:
#include <stdio.h>
int main(void)
{
int x = 20;
printf("x = %d \n", x);
return 0;
}