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...


main()
{
enum{red,green,blue=6,white};
pf("%d%d%d%d", red,green,blue,white);
return 0;
}

a)0 1 6 2
b)0 1 6 7
c)Compilation error
d)None of the above

Answers were Sorted based on User's Feedback



main() { enum{red,green,blue=6,white}; pf("%d%d%d%d", red,green,blue,white); return 0;..

Answer / aswini

how ur answer is c.can u explain that???
i think its b...

Is This Answer Correct ?    19 Yes 1 No

main() { enum{red,green,blue=6,white}; pf("%d%d%d%d", red,green,blue,white); return 0;..

Answer / rajesh

Answer : b

check it in www.codepad.org

Is This Answer Correct ?    6 Yes 0 No

main() { enum{red,green,blue=6,white}; pf("%d%d%d%d", red,green,blue,white); return 0;..

Answer / saiteja

0167

Is This Answer Correct ?    3 Yes 0 No

main() { enum{red,green,blue=6,white}; pf("%d%d%d%d", red,green,blue,white); return 0;..

Answer / niranjan kumar niraj

d)none of the above

Is This Answer Correct ?    3 Yes 2 No

main() { enum{red,green,blue=6,white}; pf("%d%d%d%d", red,green,blue,white); return 0;..

Answer / nitin.ramola

An enum is a user-defined type consisting of a set of named
constants called enumerators. The colors of the rainbow
would be mapped like this.:

enum rainbowcolors {
red,
orange,
yellow,
green,
blue,
indigo,
violet)
}


Now internally, the compiler will use an int to hold these
and if no values are supplied, red will be 0, orange is 1 etc.

Is This Answer Correct ?    1 Yes 0 No

main() { enum{red,green,blue=6,white}; pf("%d%d%d%d", red,green,blue,white); return 0;..

Answer / kalai

c

Is This Answer Correct ?    2 Yes 3 No

Post New Answer

More C Interview Questions

What is strcpy() function?

0 Answers  


What is meant by int main ()?

0 Answers  


how to print 212 as Twohundreds twelve plz provide me ans soon

1 Answers  


why the execution starts from main function

9 Answers  


triangle number finding program...

1 Answers   HCL,


Why we use int main and void main?

0 Answers  


How to delete a node from linked list w/o using collectons?

0 Answers   Zycus Infotech,


What is the memory allocated by the following definition ? int (*x)();

2 Answers   ADITI,


What is the difference between struct and typedef struct in c?

0 Answers  


how to use virual function in real time example

1 Answers   CTS, Wipro,


can we have joblib in a proc ?

0 Answers  


What is adt in c programming?

0 Answers  


Categories