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


Please Help Members By Posting Answers For Below Questions

general for is %wd,f-d; in this system "w" means a) 'w' represent total width of digits b) 'w' represent width which includes the digits before,after decimal place and the decimal point c) 'w' represent width which includes the digits before only d) 'w' represent width after decimal place only

829


How to compare array with pointer in c?

837


What are the header files used in c language?

786


What are preprocessor directives in c?

841


Why do we need a structure?

781


Write a C program to accept a matrix of any size. Find the frequency count of each element in the matrix and positions in which they appear in the matrix

1752


What is a structure and why it is used?

848


How can I remove the leading spaces from a string?

835


What are dangling pointers in c?

827


Lists the benefits of c programming language?

816


What is the advantage of using #define to declare a constant?

843


Is c call by value?

800


What is the ANSI C Standard?

998


How can you find the exact size of a data type in c?

774


In c programming language, how many parameters can be passed to a function ?

863