-
Because c c++ requires that the left side of the += statement be an "l-value". While ++a results in an lvalue, but a++ is not. Needless to say, such a mysterious statement as (a++)= a is not good, even (a++)=0 is also wrong.
As for why ++a results in lvalues but a++ is not, the simple thing is that the c c++ language itself specifies this. If we ask why this is the case, it can be explained as follows:
For a valid assignment statement (e.g., a=0), the compiler always finds the value to the right of the equal sign, then the address of the lvalue and immediately assigns the calculated value to that address.
However, for (a++)=0, if a++ can be used as an lvalue, the compiler cannot immediately assign it after finding the address of the lvalue, but inserts a plus one operation. This breaks the compiler's consistency in compiling different assignment statements.
-
First of all, it's clear that constants can't be assigned. And then we're looking at the equation above.
First of all, the operation (), a++, according to the rules of the C language, is to take out the value of a first and then add itself.
For example, a=12 is broken down to (12)+=a, a+=1.
In this way, it is clear that 12 is a constant and cannot be assigned.
The main thing is the misunderstanding of the landlord's thinking, ++ operation, what is taken out is not a variable, or the value of the variable that is taken out, that is to say, it is a constant.
-
a=a+1) +=a
Of course not, the left side of += is not assigned a value variable.
-
The answer is the same as the one upstairs.
-
Because only the absolute value of a non-positive number is equal to the opposite of the number made by the joke.
For example, the absolute value of -3 is 3, 3 is the opposite of -3, the absolute value of 0 is 0, and 0 is the inverse of 0.
If you agree with my answer, please click the "Selected as a satisfactory answer" button below, thank you!
-
That's right.
Belongs to the element set.
A chemical element is a general term for a class of atoms that have the same number of nuclear charges (i.e., the number of protons in the nucleus). From a philosophical point of view, it is the result of a qualitative change caused by a quantitative change in the number of electrons in an atom. The doctrine of the elements, that is, the doctrine of the elements as the simplest constituent parts of all real objects in nature.
It has been produced since ancient times, but the modern concept of the elements as a concrete form of matter did not exist in ancient times. Whether in the ancient philosophy of our country, or in the ancient philosophy of India or the West, the element is regarded as an abstract, a manifestation of the primitive spirit, or the basic nature of matter.
-
++ is an eye-based operator, self-incrementing, it can only be used for one variable, i.e. variable value increments by 1, and cannot be used for expressions.
(a++), parentheses take precedence.
a++) is an expression, and according to the operation rules, the expression cannot be auto-incremented.
the same ++a++; Nor can you.
a Preferred. (+a) is an expression and cannot be auto-incremented (+a)++ for (+a).
-
Invalid lvalue delta.
An lvalue is an expression that can appear to the left of an assignment expression. Lvalue expressions have space for data, and storage is allowed.
To put it bluntly, the lvalue is quite a form parameter, the right value is quite a real parameter, the form parameter can only be a variable, and the real parameter can be a numerical value or a variable. ,- These two operators are also required to act on lvalues. A++ then changes to an exact value, not a space to store data.
So it can't be considered an lvalue ++
-
++ or -- can only be used on variables, a++ is already a formula, and its value cannot be stored. Didn't your teacher talk about it?
-
The answer is as follows, because a<0, -a>0, which is |-a|=-a
a+|-a|=a-a=0
Hope it helps.
-
-|a|=|-a|Wrong.
It is only true when a=0, and it is not true at any other time, so it is not written to him since -|a|=|-a|, then what he means is that all A is true, so it is wrong, and the title should be understood as such!
Hello, Potato Group Shao Wenchao answers your questions.
If you don't understand anything about this question, you can ask it, and if you are satisfied, remember to adopt it.
It is not easy to answer the question, please understand, thank you.
And good luck with your learning!
-
Wrong. -|a|The value of is negative or 0,|a|It is a non-negative number, i.e. a 0 or positive number.
-
Of course not, the absolute values are positive.
-
Incorrect, i-ai is positive and -iai is negative, unless a is 0.
-
Incorrect, when a 0 there is: |a|=a
When a<0, |a|=-a
-
Wrong! Correct when a>0 or equal to zero!
When a<0 is equal to -a
Actually, I also think that China and foreign countries are not suitable, and they should be neutralized. >>>More
Whether he has money or not, it is good to be willing to spend money for you. >>>More
The advantages are to share the burden and reduce the burden, but at the same time, there are also disadvantages: the selfishness of the other party, the existence of their own selfishness and disharmony are all manifested in small aspects, and they are very disgusted with the AA system, because what friends or people need to get along with each other is to bear each other's burdens, not to bear their own burdens.
What is information asymmetry? The impact is in**.
support. According to your description: If you press the light cat. >>>More