Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
Programmin question please help?
would the evaluation tree for i + 4 * j be the same as (i+4) * j
if not please explain
2 Answers
- 1 decade agoFavorite Answer
No!
because always remember that * will run first before +
if you enter (i+4) * j
you are telling the computer to solve i+4 first and multiply the value of i+4 by j
i + 4 *j
this means that you are telling the computer to solve 4 * j first and add i to the value of 4*j
- 1 decade ago
i + 4 * j
is same as: i + ( 4 * j )
Reason: PEMDAS Rule
P - Parenthesis E - Exponential M - Multiplication D - Division A - Addition S - Subtraction. This is the order of operations. :)
Regards,
Jigar