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

What is a static in c#?

0 Answers  


Does c# support templates?

0 Answers  


What is int32?

0 Answers  


What is difference between encapsulation and abstraction in c#?

0 Answers  


What is the wildcard character in SQL? Let?s say you want to query database with LIKE for all employees whose name starts with La.

1 Answers  


in object oriented programming, how would you describe encapsulation?

0 Answers   Siebel Systems,


What are logical operators in c#?

0 Answers  


Does c# support multiple class inheritance?

0 Answers  


What is datatable and dataset in c#?

0 Answers  


How do I run a cshtml file?

0 Answers  


How is a string immutable?

0 Answers  


What is thread safe in c#?

0 Answers  


Categories