code with define keyword
x = 20Code:#include <stdio.h>
#define x 20
int main(void)
{
printf("x = %d \n", x);
return 0;
}
code with constant keyword
x = 20Code:#include <stdio.h>
int main(void)
{
int x = 20;
printf("x = %d \n", x);
return 0;
}
I don't see the difference between constant and define keyword in code
somebody can explain When we should really use constant and define keyword in code ?