Discussion
Assertion (A): Short circuit evaluation of a boolean expression avoids computing a value at all.
Reason (R): Each subexpression is given the destinations to jump to, so control reaches the right place without any result being stored.
Answer: D
Both are true and the reason gives the mechanism, and it also explains the semantics. Because the second operand is never reached when the first settles the outcome, side effects in it do not occur, which languages specify deliberately.
No comment is present. Be the first to comment.
Loading…
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development