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

How can I direct output to the printer?

0 Answers  


palindrome for strings and numbers----Can anybody do the prog?

6 Answers   CTS, TCS, Vipro Lifescience Pvt,


Find the output? void main() {float a=2.0; printf("\nSize of a ::%d",sizeof(a)); printf("\nSize of 2.0 ::%d",sizeof(2.0));}

11 Answers   IBM, TCS,


#include<stdio.h> int main(){ int i=10; int *ptr=&i; *ptr=(int *)20; printf("%d",i); return 0; } Output: 20 can anyone explain how came the output is 20

0 Answers  


Determine the code below, tell me exactly how many times is the operation sum++ performed ? for ( i = 0; i < 100; i++ ) for ( j = 100; j > 100 - i; j--) sum++;

5 Answers   ITCO, Wipro,


If null and 0 are equivalent as null pointer constants, which should I use?

0 Answers  


is assignment operator is arithmatic or not

3 Answers   Infosys,


what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;

0 Answers   L&T,


What is meant by initialization and how we initialize a variable?

0 Answers  


Write a program to print fibonacci series without using recursion?

0 Answers  


Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]

0 Answers  


When should a type cast be used?

0 Answers  


Categories