-
if(!a) x--;Meaning: if (!.)a) If true, execute x--。 Now 0 like a and 0 in c is false. So (!.)a)=true。So execute x--;
while(m!=n) Translated into Chinese: When m!=n, the loop is executed. If m==n, the loop is out.
ok?I hope you understand and you can analyze it step by step.
-
if(!a) x--;
If a is 0, if the judgment condition is true, x-- operation is performed, otherwise else processing is performed.
There are two cases:
A 0:0 is also a false flag, !A is true, then if the limb is valid.
Not 0:!A is 0, which is also a false flag, and is handled by else.
while(m!=n)
When the values of m and n are not equal, the while loop continues (the statement in the loop body is executed) until the values of m and n are equal, the loop is jumped out and subsequent processing is performed.
-
if(!a) x--;
If! A is true ((!.)a)!=0) x--
while(m!=n) Cycle when m is not equal to n.
-
if(!a) x--;
Here! It means "no". In other words! If the latter formula is true, "!".expression" will become untenableIf the latter formula is not valid, "!".expression" will become true.
A is a number, if it is 0, it is not true, and other values are true. So (!.)A means to determine whether a is a non-0 number.
For example: a=0, then if(!a) Establishment. a=1, then if(!a) Not established.
while(m!=n)
Here is to determine whether m is equal to n. Equivalent! ==。It's just written! = That's it.
If m is not equal to n, then while(m!=n) established. If m is equal to n, then while(m!=n) is not established.
-
if(!a) x--;When a=0, if the judgment condition is true, x-- operation is performed, otherwise else processing is performed
while(m!=n) When m is not equal to n, the loop continues (continues to execute the statement in the loop body) until m and n values are equal, and then the loop is jumped out and subsequent processing is performed.
-
a is when a is not equal to 0.
m!=n is m not equal to n
-
1、int
x=2,y=2,a;
a=(x=x+1)丨丨(y=y+1), the parentheses have the highest priority, and the x=x+1,x in the first parenthesis is calculated first
3, 3 is not 0, is logically true.
Logic or operator, if one side is true, then the result must be true, so ||The right side is not calculated, and the whole result is a logical true value assigned to a
In the end, it is a=1, x=3, y=2 (y=y+1 is optimized and not calculated) 2, int
x=2,y;
x=(y=3,2+y,2*y)
Inside the parentheses is the comma expression, and the result of the comma expression is the value of the rightmost expression, that is, the value of 2*y is the value of the expression (y=3,2+y,2*y), and then the value is assigned to x
The comma expression is calculated from left to right, first y=3, then 2+y, and finally 2*y, that is, 2*3=6 is assigned to x
In the end, it's x=6
Let me ask you your questions.
First of all, you are talking about whether the **game will damage the computer,It's inevitable,But you don't have to worry,Because usually**the damage to the hard disk is negligible,As long as it's not a frequent bt**,don't worry too much.。 >>>More
Grounding Point: v2-= 0
then v2+ = bat2 >>>More
FIBA is a 40-minute match, divided into two halves, 20 minutes each. >>>More
You don't know anything about lawyers?! Want to be a lawyer? >>>More
The original meaning of the question is to implement the function of one queue with two stacks. >>>More