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

Tell us two differences between new () and malloc ()?

0 Answers   Adobe,


prototype of sine function.

2 Answers   Cadence,


what is the use of using linked list and array?

10 Answers   Infosys, TCS,


24.what is a void pointer? 25.why arithmetic operation can’t be performed on a void pointer? 26.differentiate between const char *a; char *const a; and char const *a; 27.compare array with pointer? 28.what is a NULL pointer? 29.what does ‘segmentation violation’ mean? 30.what does ‘Bus Error’ mean? 31.Define function pointers? 32.How do you initialize function pointers? Give an example? 33.where can function pointers be used?

0 Answers  


write a program to rearrange the array such way that all even elements should come first and next come odd

0 Answers  






why we are using semicolon at the end of printh statment

2 Answers   HCL,


What are c identifiers?

0 Answers  


Can main () be called recursively?

0 Answers  


How can you find the exact size of a data type in c?

0 Answers  


how to find out the reverse number of a digit if it is input through the keyboard?

6 Answers  


What does %c do in c?

0 Answers  


What are the different types of pointers used in c language?

0 Answers  


Categories