C
Programming and Technical
Programming
Technical
printf("%d",main||c);
Read Solution (Total 7)
-
- @snehasis: Here || operator is used, which returns 1 when first operand is not zero, without evaluating second operand, so it returns 1 because the address of main function is not zero.
- 11 years agoHelpfull: Yes(9) No(0)
- Output : 1
- 11 years agoHelpfull: Yes(2) No(0)
- @saraswathy: can you explain how you got 1 ?
- 11 years agoHelpfull: Yes(2) No(0)
- OUTPUT IS 1.
- 11 years agoHelpfull: Yes(0) No(0)
- @NEHA: thanks for your valuable answer. :)
- 11 years agoHelpfull: Yes(0) No(0)
- [Warning] the address of `main', will always evaluate as `true'. So ans is 1.
- 10 years agoHelpfull: Yes(0) No(0)
- it return i becz o adress is resever for os so || is opt so its adrees is 1
- 10 years agoHelpfull: Yes(0) No(0)
C Other Question