What is short circuit logical evaluation?

Answer Posted / amitabh dubey

Consider This
int x = 8;

if((x == 8) || (y == 12))

Since first expression (x == 8) evaluates to true and it is
seperated by || (or operator) by second expression in the
if statment, c# compiler will short-circuit the evaluation,
and the second statement will never be evaluated.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is as keyword in c#?

568


What is serialization of data?

503


Which namespaces are necessary to create a localized application?

604


What is the difference between malloc () and new?

487


Explain About a class access specifiers and method access specifiers.

531






What are the commonly used i/o classes?

526


What is the benefit of using interface in c#?

490


What is a console application in c#?

439


windows c# using datagridview in edit form sql server

3561


What is Implementation inheritance

510


In a memory when you Box and Unbox a value-type what happens?

539


can you allow a class to be inherited, but prevent the method from being over-ridden?

543


What is .cs file in c#?

515


Can fields inside a class be virtual?

529


Which class does the remote object has to inherit?

600