Good questions in c programming language.
(1) What will be output
of the following program?
void main(){
enum data{a,b,c};
clrscr();
printf("%i %i %i",a,b,c);
getch();
}
Output: 0 1 2
Explanation:
By default initial
value of first enum constant is zero. Value of next enum constant
will be:
Next_enum_constant_value=previous_enum_constant_value+1
(2) What will be output
of
No comments:
Post a Comment