What is short circuit logical evaluation?



What is short circuit logical evaluation?..

Answer / 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

More C Sharp Interview Questions

How to create multi-dimensional array?

0 Answers   C DAC, CDAC,


What?s the difference between an interface and abstract class?

6 Answers   Mind Tree, Siebel,


What are different types of classes in c#?

0 Answers  


What are virtual classes in c#?

0 Answers  


What is difference between private, protected, and public in C#?

0 Answers   B-Ways TecnoSoft,






what are the files we need to deploay a project in the system?

2 Answers  


What's the difference between an integer and int?

0 Answers  


What you mean by inner exception in c#?

0 Answers  


What is the difference between “finalize” and “finally” methods in c#?

0 Answers  


What are the examples of data types?

0 Answers  


Why do we need constructor in c#?

0 Answers  


What are some of the commonly used commands in sqlcommand?

0 Answers  


Categories