ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C
 
 


 

 
 C interview questions  C Interview Questions
 C++ interview questions  C++ Interview Questions
 VC++ interview questions  VC++ Interview Questions
 Delphi interview questions  Delphi Interview Questions
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions
Question
enum colors {BLACK,BLUE,GREEN}
 main()
{
  
 printf("%d..%d..%d",BLACK,BLUE,GREEN);
   
 return(1);
}
 Question Submitted By :: Surenda Pal Singh Chouhan
I also faced this Question!!     Rank Answer Posted By  
 
  Re: enum colors {BLACK,BLUE,GREEN} main() { printf("%d..%d..%d",BLACK,BLUE,GREEN); return(1); }
Answer
# 1
0..1..2

Explanation:
enum assigns numbers starting from 0, if not explicitly 
defined
 
Is This Answer Correct ?    6 Yes 0 No
Surenda Pal Singh Chouhan
 
  Re: enum colors {BLACK,BLUE,GREEN} main() { printf("%d..%d..%d",BLACK,BLUE,GREEN); return(1); }
Answer
# 2
the ascii values of B,B,G will be printed..............
since these black,blue and green are strings given directly
in the printf statements..... so the base address will be
going to the function definition of printf......
 
Is This Answer Correct ?    0 Yes 5 No
Vignesh1988i
 
 
 
  Re: enum colors {BLACK,BLUE,GREEN} main() { printf("%d..%d..%d",BLACK,BLUE,GREEN); return(1); }
Answer
# 3
0,1,2
 
Is This Answer Correct ?    4 Yes 1 No
Paresh
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
C,c++, Java is all are structural oriented or procedure oriented language..?  3
Write a c code segment using a for loop that calculates and prints the sum of the even integers from 2 to 30, inclusive?  2
what is the value of 'i'? i=strlen("Blue")+strlen("People")/strlen("Red")-strlen("green") Cadence4
value = 0xabcd; for (loop = 1; (value >> 1) & 1 | loop & 1; loop++) { foo(); if (loop & 1) value >>= 1; } how many times is foo() executed? Google5
a=0; while(a<5) printf("%d\n",a++); how many times does the loop occurs? a.infinite b.5 c.4 d.6 TCS5
What is the difference between null pointer and the void pointer?  2
What do you mean by team??  2
why java is called as a purely oops language.  2
44.what is the difference between strcpy() and memcpy() function? 45.what is output of the following statetment? 46.Printf(“%x”, -1<<4); ? 47.will the program compile? int i; scanf(“%d”,i); printf(“%d”,i); 48.write a string copy function routine? 49.swap two integer variables without using a third temporary variable? 50.how do you redirect stdout value from a program to a file? 51.write a program that finds the factorial of a number using recursion?  3
Write a function that accepts two numbers,say a and b and makes bth bit of a to 0.No other bits of a should get changed. Scientific-Atlanta2
what are the languages used in c#? Infosys1
main() { int arr[5]={23,67}; printf("%d%d%d",arr[2],arr[3],arr[4]); } TCS6
Write a C Programm.. we press 'a' , it shows the albhabetical number is 1, if we press 'g' it shows the answer 7.. any can help me  4
plz answer..... a program that reads non-negative integer and computes and prints its factorial  2
Write code for atoi(x) where x is hexadecimal string. Adobe2
differentiate between const char *a; char *const a; and char const *a; HCL1
void main() { int i=5; printf("%d",i++ + ++i); } ME11
main() { printf("\n %d %d %d",sizeof('3'),sizeof("3"),sizeof(3)); } wat is the o/p and how?  7
how to find the size of the data type like int,float without using the sizeof operator?  7
DIFFERNCE BETWEEN THE C++ AND C LANGUAGE? Wipro2
 
For more C Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com