what is the output of below pgm?
void main()
{
int i=0;
if(i)
printf("pass");
else
printf("fail");
}

Answers were Sorted based on User's Feedback



what is the output of below pgm? void main() { int i=0; if(i) printf("pass"); else ..

Answer / himanshu goel

fail
because here if is taking 0 boolean value means condition
becomes false and else will be executed

Is This Answer Correct ?    12 Yes 0 No

what is the output of below pgm? void main() { int i=0; if(i) printf("pass"); else ..

Answer / sweta

fail

Is This Answer Correct ?    6 Yes 0 No

what is the output of below pgm? void main() { int i=0; if(i) printf("pass"); else ..

Answer / vignesh1988i

FAIL



THANK U

Is This Answer Correct ?    3 Yes 0 No

what is the output of below pgm? void main() { int i=0; if(i) printf("pass"); else ..

Answer / srikanth patchava

fail

if check value is thear or not ..if its thear it will got
frist printf other wise it will goto second printf

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

Why do we use int main?

0 Answers  


What is an array in c?

0 Answers  


Explain how are portions of a program disabled in demo versions?

0 Answers  


Do you have any idea about the use of "auto" keyword?

0 Answers  


C program execution always begins with a) #include b) comment (/*-------*/) c) main() d) declaration instructions

0 Answers  






in any language the sound structure of that language depends on its a) character set, input/output function, its control structures b) character set, library functions, input/output functions its control structures c) character set, library functions, control sturctures d) character set, operators, its control structures

0 Answers  


Is it better to use malloc() or calloc()?

0 Answers   Aspire, Infogain,


How can I write functions that take a variable number of arguments?

0 Answers  


In which category does main function belong??

5 Answers  


write a c program to find the largest and 2nd largest numbers from the given n numbers without using arrays

0 Answers   IBM,


ASCII stands for

1 Answers  


How will you allocate memory to a double pointer ?

2 Answers  


Categories