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                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
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 ?    0 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 ?    0 Yes 0 No
Sweta
 
 
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
WRITE A PROGRAM TO PRINT THE FOLLOWING OUTPUTS USING FOR LOOPS. A) * B) ***** *** * * ***** * * *****  2
what is the use of #pragma pack, wer it is used?  1
int main() { int *p=new int; *p=10; del p; cout<<*p; *p= 60; cout<<*p; } what will be the output & why? TCS3
write the program for prime numbers? TCS7
9.how do you write a function that takes a variable number of arguments? What is the prototype of printf () function? 10.How do you access command-line arguments? 11.what does ‘#include<stdio.h>’ mean? 12.what is the difference between #include<> and #include”…”? 13.what are # pragma staments? 14.what is the most appropriate way to write a multi-statement macro? L&T4
different between overloading and overriding  3
pgm to find middle element of linklist(in efficent manner) Huawei1
What are the phases in s/w developed life cycle? wat is the diff b/w stack & queue...where do we use stack  5
When you call malloc() to allocate memory for a local pointer, do you have to explicitly free() it?  2
What are the uses of pre-processor directives?  2
what is c? Tech-Mahindra4
Write a program that takes three variables(a,b,c) in as separate parameters and rotates the values stored so that value a goes to b,b,to c and c to a  2
The differences between Windows XP and Windows Visa HCL6
in C-programming language without using printf statement can we get output r not ? if yes how and if no also how ?  4
Find Error if any in below code, Justify ur answer: struct xx { int a; struct yy { char c; struct xx* p; } struct yy* q; } NDS2
There is a 100-story building and you are given two eggs. The eggs (and the building) have an interesting property that if you throw the egg from a floor number less than X, it will not break. And it will always brake if the floor number is equal or greater than X. Assuming that you can reuse the eggs which didn't broke; you got to find X in a minimal number of throws. Give an algorithm to find X in minimal number of throws.  2
Would you rather wait for the results of a quicksort, a linear search, or a bubble sort on a 200000 element array? 1) Quicksort 2) Linear Search 3) Bubble Sort  2
When is an interface "good"?  1
#include<stdio.h> main() { char s1[]="Ramco"; char s2[]="Systems"; s1=s2; printf("%s",s1); } Find the output CitiGroup4
What's wrong with "char *p = malloc(10);" ?  4
 
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