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

Write a client and server program in C language using UDP, where client program interact with the Server as given below: i) The client begins by sending a request to send a string of 8 characters or series of 7 numbers, the server sends back a characters or numbers as per the request of the client. ii) In case of series of 7 numbers: The client sends a multiplication of numbers, to the server. iii) In case of a string of 8 characters: The client sends a reverse order of string to the server.. iv) Server will send an acknowledgment to the client after receiving the correct answer

0 Answers   Microsoft, Ignou,


What is the output of the program #include<stdio.h> #include<conio.h> void main() {0 int i,j=20; clrscr(); for(i=1;i<3;i++) { printf("%d,",i); continue; printf("%d",j); break; } getch(); }

4 Answers   CTS, Oracle,


Determine the result of performing two successive block transfers into the same area of a frame buffer using the binary arith operations

0 Answers  


what is ans for this scanf(%%d",c);

1 Answers  


change to postfix a/(b+c*d-e)

8 Answers   Value Labs,






what is c

1 Answers  


Print all numbers which has a certain digit in a certain position eg: number=45687 1 number=4 2 number=5 etc

4 Answers  


Give basis knowledge of web designing ...

0 Answers   HCL,


What should be keep precautions while using the recursion method?

1 Answers  


f(*p) { p=(char *)malloc(6); p="hello"; return; } main() { char *p="bye"; f(p); printf("%s",p); } what is the o/p?

7 Answers   Hughes,


which is the best site or book for learning C...and i need the content for C..how to get the good programming skills....? can plz suggest me....

2 Answers  


what is the little endian and big endian?

1 Answers  






Categories