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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How #define works?

582


What kind of structure is a house?

531


What is .obj file in c?

626


What is NULL pointer?

649


Write a program to swap two numbers without using third variable?

791






Why is %d used in c?

543


What is wrong in this statement? scanf(ā€œ%dā€,whatnumber);

703


What is a pragma?

644


What is the purpose of main( ) in c language?

591


What is cohesion in c?

522


In which language linux is written?

577


Linked list is a Linear or non linear explain if linear how it working as a non linear data structures

1739


main use of recursive function a) processing speed high b) reduce program length/reduce repeated statements c) if you do not, use iterative methods like, for, while or do-while d) all the above

584


What is an operator?

631


Once I have used freopen, how can I get the original stdout (or stdin) back?

603