int a 12 a a a a in c language

Updated on technology 2024-03-01
21 answers
  1. Anonymous users2024-02-06

    <> multiplication sign first, priority 3, a*a The result is 144a+=a-= x This formula is a compound of a = a+() and a = a - () represents the previous formula.

    The priority of and-= is from right to left, so first a-= and then a+= , so the formula is actually.

    a=a-a*a -132 = 12-144a = a+a -264 = -132-132 Answer -264

    Plus, the compiler doesn't lie.

  2. Anonymous users2024-02-05

    int a=12;

    The value of a after declaration and initialization is 12*

    a/=a+a;

    In a compound assignment statement, the value of the right expression a+a is 24.

    The result is equivalent to a = a 24, since a is an int type, and the operations on both sides are int type, so it is divisible, 12 is divided by 24 quotient 0 and 12, and the quotient is assigned to a.

    So in the end a is equal to 0

    Original group].

  3. Anonymous users2024-02-04

    This is actually wrong, according to this, the part that initializes A is A+=A-=A*=A, but A is not initialized, so it is contradictory, it should be like this;

    int a=12;

    a+=a-=a*=a;

    Then a is 0a+=a-=a*=a, which can be decomposed step by step.

    Calculate a*=a->a=a*a

    a=12*12=144

    Recalculate: a-=a*=a, which is equivalent to a-=144->a=a-144, a=0, then a+=a-=a*=a, a+=0

    a=0a+=a-=a*=a is the assignment expression, just do it step by step from right to left.

  4. Anonymous users2024-02-03

    It can be broken down into the following steps:

    int a1=a*a;

    int a2=a-a1;

    a=a+a2;

  5. Anonymous users2024-02-02

    d。Taken apart, a=a+(a-=a*a), in the dismantling a=a+(a=a-a*a) from the back. Calculate a=a-a*a equals -132, and calculate a=a+(-132) and the result is d.

    For example, run a*a=144

    Then a=a-144

    At this point a=-132

    Run a=a+(-132).

    a=-264

  6. Anonymous users2024-02-01

    Taken apart, a=a+(a-=a*a) and then disassemble a=a+(a=a-a*a) and count from behind. First calculate a=a-a*a equals -132 and then a=a+(-132) and the result is d

  7. Anonymous users2024-01-31

    The answer should be B

    a=10, a+10, a++ is a comma expression, the rule of the comma expression is what the first expression is calculated from the first expression until the last expression is calculated, and the value of the last expression is the value of the comma expression.

    According to this rule, a = 10 is calculated first, the value is equal to 10, and the variable a is also assigned a value of 10. Calculate a+10 and the value is 20Finally, the value of A++ is calculated to be 10, and the value of A is 11But the value of the whole expression is 10, so choose b.

  8. Anonymous users2024-01-30

    The whole expression is equivalent to (a=10), a+10, a++, is a comma expression, the value is 10, and a is finally equal to 11.

  9. Anonymous users2024-01-29

    The answer is 11, and this is the number of words.

  10. Anonymous users2024-01-28

    Summary. <>

    Hello <> dear, for this question, a+=2 means adding 2 to the value of a, that is, a=a+2. Therefore, int+a=1, a+=2 results in a=3.

    int+a=1,a+=

    <> dear, Duan Chuan imitates this problem of lack of combustion, a+=2 shows that the value of a is increased by 2, that is, a=a+2. Therefore, int+a=1, a+=2 results in a=3.

    When a number is added to another number, Chuntan can be represented by the addition operator (+). The Pick Up Tung method operator can be used to add two numbers together to get a new number. For example, int + a = 1, which means that int and a are added together, and the result is 1.

    The addition operator can also be used for strings, which can concatenate two strings. For example,"hello" +world"As a result:"helloworld"。The addition operator can also be used for arrays, which can combine two numbers into a single array.

    For example, [1,2,3] +4,5,6] results in a smeander[1,2,3,4,5,6]. In short, the addition operator is a very useful operator for numbers, strings, and arrays, which can make it easier for us to complete addition operations in circles.

    I can't receive ** here, just say what problem you encounter, I'll answer <> for you

  11. Anonymous users2024-01-27

    The final A value of the most touring Li You is 0

    a/=a+a

    Namely. a=a/(a+a)

    The whole Shenhuai type data phase is calculated, and the result is still the envy integer, and the result retains the integer part of 0

  12. Anonymous users2024-01-26

    Assignment statements are calculated sequentially from right to left.

    So a+=a-=a*=a;

    Equivalent to: a*=a;

    a-=a;a+=a;

    So equivalent to:

    a=a*a==12*12==144;

    a=a-a==144-144==0;

    a=a+a==0+0==0;

    The value of the last a is 0

  13. Anonymous users2024-01-25

    +=, -=, *= are all right-to-left operators, so it is easy to add parentheses according to thisa+=(a-=(a*=a)) The result is 0

    a*=aResulta=144

    a-=a The result is definitely 0.

    a+=a is 0

    If you look at the following statements, you will be able to compile them into a compilation and you will understand it better.

  14. Anonymous users2024-01-24

    From right to left, a*=a is 144, a-=a is 144-144 is 0, and finally a+=a is 0.

    My roommate said it.

  15. Anonymous users2024-01-23

    int a=12;A is assigned a value of 12

    a+=a-=a*=a;//a*=a;The value of a is 12*12=144;a-=144 is a is 0

    So the value is 0

  16. Anonymous users2024-01-22

    (a<<=2/a)>>1

    Calculate 2 a first, and the expression is:

    a<<=1)>>1

    Then calculate a<<=1, that is, a=a<<1, the value of a is 1, and the expression is:

    Its value is 2. Therefore, the value of the last a is 1 and the value of the expression is 2.

  17. Anonymous users2024-01-21

    The priority of the division operator is higher than that of <<= left shift assignment, so first look at 2 a The result is 1, a<<=1 is a=a<<1 shifts left by one place, because the initial a is 2, then a is 4 after assignment, and the value of the last 4>>1 is 2

  18. Anonymous users2024-01-20

    Dismemberment a<<=2 a is a=a<<(2 a) A is assigned to the power of a multiplied by 2 to the power of 2, and a is calculated to be 4

    In "1" is a divided by 2 to the power of 1, calculate the whole expression for 2, and compile it yourself, and the result is still 2

    #include

    int main(void)

  19. Anonymous users2024-01-19

    #include

    int main()

    Run result -24, don't believe yourself to verify;

  20. Anonymous users2024-01-18

    -24a+=a =a*a first calculate a-=a*a, which is equivalent to a=a-a*a=4-4*4=-12 This step is calculated a=-12

    Then calculate a+=-12, which is equivalent to a=a+(-12)=-24

  21. Anonymous users2024-01-17

    It should be -24

    Calculate the value of a*a = 16 first

    Recalculate a-=8 = a=a-8 = 4-16=-12, then calculate a+=? = a=a+-12 = -12+ -12 = -24

    The final result is equal to -24

Related questions
8 answers2024-03-01

The semicolon is the sign of the end of the statement, but the semicolon is not used after the loop, if, and subfunctions such as long long a (int b), and everything else is used, but two semicolons cannot be added, although it will not cause an error, but it may affect the result.

6 answers2024-03-01

Understand the following rules: 1) Overloading an operator does not change the priority of the operator. >>>More

7 answers2024-03-01

do is used to loop.

For example. int i=1,sum=0; >>>More

18 answers2024-03-01

Why they are taken in this way, and why x is from 1 to 14, this needs to be carefully calculated. Because the amount of calculation in this problem is very small, sometimes I try to save my own effort (calculate a little less) and let the computer calculate a little more. >>>More

7 answers2024-03-01

A local variable (an internal variable) is defined inside a function, and its scope is limited to the variable inside the function that defines it. >>>More