Can I pass a enumerate type pointer to a function?
I have never seen people pass enum type pointer to a function?
why???? is it unsafe data by passing that way???
enum Color {GREEN, YELLOW, RED};
void main(void)
{
enum Color colorVar = GREEN;
foo(&colorVar);
return;
}
void foo(enum Color *colorPtr)
{
*colorPtr = RED;
printf(" Traffic light now is RED");
}