What is the output for the program given below
typedef enum grade{GOOD,BAD,WORST,}BAD;
main()
{
BAD g1;
g1=1;
printf("%d",g1);
}
Answer Posted / fefrf
In linux you get following error
enum.c:2: error: `BAD' redeclared as different kind of symbol
enum.c:2: error: previous declaration of `BAD'
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Describe static function with its usage?
Explain what is the difference between far and near ?
what is stack , heap ,code segment,and data segment
Explain how can I convert a string to a number?
what are the advantages of a macro over a function?
What is the right type to use for boolean values in c? Is there a standard type? Should I use #defines or enums for the true and false values?
What does *p++ do? What does it point to?
What is a structure and why it is used?
What is an lvalue?
What does s c mean in text?
What is meant by type specifiers?
How does placing some code lines between the comment symbol help in debugging the code?
This is a variation of the call_me function in the previous question:call_me (myvar)int *myvar;{ *myvar += 5; }The correct way to call this function from main() will be a) call_me(myvar) b) call_me(*myvar) c) call_me(&myvar) d) expanded memory
Explain goto?
What is the use of #include in c?