C Programming - Typedef - Discussion
Discussion Forum : Typedef - Find Output of Program (Q.No. 1)
1.
What will be the output of the program?
#include<stdio.h>
int main()
{
enum color{red, green, blue};
typedef enum color mycolor;
mycolor m = red;
printf("%d", m);
return 0;
}
Discussion:
12 comments Page 2 of 2.
Noobie said:
8 years ago
How to print red in this program? Can anyone explain it?
Harshini said:
7 years ago
Here enum is same as an array but it considers only the integer values.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers