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       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
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
what is the output of below pgm?
void main()
{
 int i=0;
if(i)
printf("pass");
else
printf("fail");
}
 Question Submitted By :: Raji
I also faced this Question!!     Rank Answer Posted By  
 
  Re: what is the output of below pgm? void main() { int i=0; if(i) printf("pass"); else printf("fail"); }
Answer
# 1
fail
because here if is taking 0 boolean value means condition
becomes false and else will be executed
 
Is This Answer Correct ?    4 Yes 0 No
Himanshu Goel
 
  Re: what is the output of below pgm? void main() { int i=0; if(i) printf("pass"); else printf("fail"); }
Answer
# 2
fail
 
Is This Answer Correct ?    1 Yes 0 No
Sweta
 
 
 
  Re: what is the output of below pgm? void main() { int i=0; if(i) printf("pass"); else printf("fail"); }
Answer
# 3
FAIL



THANK U
 
Is This Answer Correct ?    0 Yes 0 No
Vignesh1988i
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
what is the diff b/w static and non static variables in C. Give some examples plz. Wipro2
What is the function of ceil(X) defined in math.h do? A)It returns the value rounded down to the next lower integer B)it returns the value rounded up to the next higher integer C)the Next Higher Value D)the next lower value Accenture3
how many keywords do C compile? Microsoft2
can anyone proide me reading material on svit00ef27@yahoo.com please thanx in advance IBM1
void main() { char far *farther,*farthest; printf("%d..%d",sizeof(farther),sizeof(farthest)); } ME3
how to find sum of digits in C? CTS10
what are brk, sbrk? Oracle1
What are bit fields? What is their use? Adobe1
if a five digit number is input through the keyboard, write a program to calculate the sum of its digits. (hint:-use the modulus operator.'%')  9
I have a function which accepts a pointer to an int. How can I pass a constant like 5 to it?  3
how to find the size of the data type like int,float without using the sizeof operator?  7
what are two categories of clint-server application development ?  1
Who had beaten up hooligan "CHAKULI" in his early college days?  1
main() { int i = 1; int num[] = {1,2,3,4}; num[i] = i++; printf("%d", num[i]); } what will be the output? } NDS15
how can i make a program with this kind of output.. Enter a number: 5 0 01 012 0123 01234 012345 01234 0123 012 01 0 Wipro4
Given an array of characters, how would you reverse it? How would you reverse it without using indexing in the array?  1
main() { char *ptr = "Ramco Systems"; (*ptr)++; printf("%s\n",ptr); ptr++; printf("%s\n",ptr); } Find the Outputs? CitiGroup7
#define f(x) main() { printf("\n%d",f(2+2)); }  3
What is meant by global static? why we have to use static variable instead of Global variable L&T2
Main must be written as a.the first function in the program b.Second function in the program c.Last function in the program d.any where in the program TCS12
 
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