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

Explain About sn.exe

0 Answers  


Explain About friend and Protected friend

0 Answers  


What is the difference between struct and class c#?

0 Answers  


Can you declare the override method static while the original method is non-static?

5 Answers  


These questions were asked me in a technical interview: •If we deploy an application on multiple server (like database server, web server) then, each request should be redirected to proper server, then how you will handle it in your code? •How security pinholes will be handled in an application? •What things should be considered while writing a web application? •How will you do load/performance testing of web application? Which framework you will use for it? •How will you implement a cache for results which require a DB access? Please let me know how to write an web application considering all these points. I am not so much aware of architechural design of web application. Your guidelines will be helpful.

0 Answers   TCS,






Is it possible to execute multiple catch block for a single try statement?

0 Answers   Siebel,


How can you overload a method?

3 Answers  


What do you know about Translate Accelerator?

0 Answers   C DAC,


Why do we need oops in c#?

0 Answers  


Why are c# strings immutable?

0 Answers  


Can a sealed class be used as a base class?

0 Answers  


What is the default value of object in c#?

0 Answers  


Categories