← Back to Question List
C# Code Walkthrough #22
Short-Circuit Evaluation Counts Calls
📄 Code
Read carefully — what does this print?1int count = 0;2bool Inc()3{4 count++;5 return true;6}7bool r1 = Inc() || Inc();8bool r2 = Inc() && Inc();9Console.WriteLine(count);