'&&'
The logical-AND operator produces the value 1 if both operands have nonzero
values. If either operand is equal to 0, the result is 0. If the first operand of a
logical-AND operation is equal to 0, the second operand is not evaluated.
'||'
The logical-OR operator performs an inclusive-OR operation on its operands.
The result is 0 if both operands have 0 values. If either operand has a nonzero
value, the result is 1. If the first operand of a logical-OR operation has a nonzero
value, the second operand is not evaluated.
Die Operanden von logischem AND und logisch-ODER-Ausdrücke ausgewertet werden, von links nach rechts. Wenn der Wert des ersten Operanden ausreicht, um das Ergebnis der Operation zu ermitteln, wird der zweite Operand nicht ausgewertet. Dies wird als "Kurzschlussauswertung" bezeichnet. Es gibt einen Sequenzpunkt nach dem ersten Operanden.
Danke, :)
eigentlich, was ist Ihre Hauptanforderung? Warum werden Sie diese Variable zuweisen? –