Q1.What will be output:
void main()
{
enum {a,b=32766,c,d,e=0};
clrscr();
printf("%d",a);
getch();
}
Output: error
Explanation: value of enum constant must be within range of signed int .
Maximum value of signed int is 32767 while value of d=32768
Q2.What will be output of following program?
void main()
{
enum colour { green,red=5,blue,white,yellow=10,pink };
printf(“%d %d %d %d %d %d,green,red,blue,white,yellow,pink}
};
Output: 0 5 6 7 8 10 11
The Vera Zvonareva Picture
-
*Vera Zvonareva*
NEW YORK CITY, NEW YORK
*V. ZVONAREVA/K. Kanepi6-3, 7-5*
THE MODERATOR: Questions, please.
*Q. Crazy, crazy kind of weather out...
13 years ago
No comments:
Post a Comment