Okay, in the next program we are going to continue with understanding how to right expressions that change the flow of control. So, we're going to continue to use the if-else logic, but we are going to change the kind of expression we test for. The kind of expression we will test for is a logical and expression. So you'll see in the heading here this program is about logical operators and to understand them properly, short-circuit evaluation. This is a program that's going to tell us whether to take an umbrella when we go outside or not. So first off, we have to know whether we're outside. We don't need an umbrella on the inside, and we have to know weather and we're just going to use very simple values for weather inside or outside. Outside is going to be assigned one if we're outside, and zero if we're inside. Weather's going to be assigned one if it's raining and zero if it's not raining. So in the program, we're asking the user to tell us whether you're inside or outside. Enter if outside one, one representing true and zero representing false. So recall, in an expression in which you test for an effect, true or false, what you are really testing four is zero and non-zero. So zero represents false, one represents true, and the same is going to be the case for the variable weather. So here we ask for the weather. Depending on whether we're outside and whether the rain is raining, we're going to write please use an umbrella or dress normally. Well, if you recall anything about elementary logic, the only time a logical end statement is true where there are two clauses a and b is when both clauses are true. So outside has to be true, namely one. Weather has to be one, namely rain, and only then would you printf, please use an umbrella.The other three cases all involve dress normally. So you should try to review that or make sense out of that if you're not familiar with that. Now, we're going to talk about a very interesting efficiency hack in the C programming language which is in this expression, if outside is false namely zero, then it doesn't matter what the weather is. We're going to address normally. So when outside is false, the expression is already false. So that means c else dress normally will be printed. That's called short-circuit evaluation. Imagine that these two things are very complicated expressions, then they actually would save you a lot of computation. Again, this is the idea behind short-circuit evaluation. You needn't evaluate this part of the expression if the first part of the expression already determines the result. I want to look at some detail, and the detail is how to evaluate A & & B. This is just review hopefully. In logic there are four cases. The A can be true, the B can be true. The A can be true, the b can be false. The A can be false, the B can be true. This is what's called a truth table, and finally both arguments are false. The result is true, false, false, false. Again if we recall on short-circuit evaluation, anytime the first argument determines the overall result in this case when the first argument evaluates false, we needn't evaluate the second argument. So we avoid evaluating the second argument. That's called short circuit evaluation. One last thing about this operator is its precedence, very low. I'm going to go over the whole precedence table but by very low, I mean it's below any kind of mathematical expression. So if there's a mathematical expression involved in these arguments, then they would be evaluated before the logic by the end of the value.