Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
And why is the #define construct used more often in microcontroller programming?
Why are enum variables needed?
The main difference from symbolic constants is that enums have a different scope.
#include <stdio.h>
int main(void)
{
enum { A, B, C };
{
enum { A = 10 };
printf("%d\n", A);
}
printf("%d %d %d\n", A, B, C);
return 0;
}
[[email protected] c]$ .ansi t.c -o t
[[email protected] c]$ ./t
10
0 1 2
[[email protected] c]$
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question