The line above uses the + operator to add the values stored in the locations a and b and the assignment 9L0-509 operator (=) to store the result in the location sum. a and b are said to be the operands of +. The combination a + b is called an expression, specifically an arithmetic expression since + is an arithmetic operator. Similarly, = and its operands, sum and a + b together form the assignment expression sum = a + b (Note that the semicolon 9L0-402 Exam is not part of the expression). Other arithmetic operations that can be performed on integers (also common in many other languages) include:
* Subtraction, using the - operator
* Multiplication, 9L0-509 using the * operator
* Division, using the / operator
* Remainder, using the % operator
The multiplicative operators *, / and % are always evaluated before the additive operators + and -. Among operators of the same class, evaluation proceeds from left to right. This order can be overridden using grouping by parentheses, ( and ); the expression 9L0-402 Braindump contained within parentheses is evaluated before any other neighboring operator is evaluated. But note that some compilers may not strictly follow these rules when they try to optimize the code being generated, unless violating the rules would give a different answer.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment