Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 / ashwin kumar

error is the answer as 2nd person answer

we can remove error by changing code as follows
typedef enum grade{GOOD,BAD,WORST,} bad;
main()
{
bad g1;
g1=1;
printf("%d",g1);
}

out is 1 for above code






actual error in 1st code is declearing same variable 'BAD'

at two place in enum




if my answer is wrong or any corrections are made by u plz
inform me


molugu.ashwin@gmail.com

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

please explain every phase in the "SDLC" in the dotnet.

2619


What is the difference between array_name and &array_name?

1302


in ‘C’ language for Matrix Multiplication fails” Introspect the causes for its failure and write down the possible reasons for its failure.

8050


please help me..... please codes and flowchart plz turbo c lang po yan.....please asap response... 3. Make an astrology program. The user types in his or her birthday (month, day, and year as integer), and the program responds with the user’s zodiac sign, horoscope, and other information related to it. If the user’s birth year falls into a leap year, your program should display an appropriate message for it. NOTES: Conditional Statements: it should be with graphics

3338


For what purpose null pointer used?

1078


What should malloc(0) do? Return a null pointer or a pointer to 0 bytes?

1080


What is pointer to pointer in c language?

1151


What is the benefit of using an enum rather than a #define constant?

1240


what are # pragma staments?

2046


What is a rvalue?

1203


What is difference between stdio h and conio h?

1381


Explain what is the benefit of using an enum rather than a #define constant?

1222


Differentiate between declaring a variable and defining a variable?

1044


What are the advantages of using linked list for tree construction?

1104


What are the advantages of using Unions?

1121