Accenture
Company
Numerical Ability
Arithmetic
What will be the output of the following code statements?
integer a = 10, b = 35, c = 5 print a * b / c – c
Read Solution (Total 11)
-
- Assume the following precedence (high to low). Operators in the same row have the same precedence: (.) * / + - AND OR For operators with equal precedence, the precedence is from left-to-right in expression. What will be the output of the following code statements? integer a = 50, b = 25, c = 0 print ( a > 45 OR b > 50 AND c > 10 ) pls explain this
- 7 years agoHelpfull: Yes(10) No(0)
- 10*35/5-5
70-5
65 - 9 years agoHelpfull: Yes(6) No(1)
- ans 65
apply bodmas rule - 9 years agoHelpfull: Yes(1) No(1)
- 10*35/5-5=350/5-5=70-5=65
- 9 years agoHelpfull: Yes(1) No(0)
- 10*35/5-5=350/5-5=70-5=65
- 9 years agoHelpfull: Yes(0) No(0)
- 10*35/5-5=70-5=65
- 9 years agoHelpfull: Yes(0) No(1)
- 10*35/5-5
it follows the rule from left to right evolution so,
350/5-5
70-5
65 - 9 years agoHelpfull: Yes(0) No(0)
- 65
As per BODMAS Rule - 9 years agoHelpfull: Yes(0) No(0)
- 10*7-5
=65 - 8 years agoHelpfull: Yes(0) No(0)
- error!
divide with 0 ans is infinity - 5 years agoHelpfull: Yes(0) No(0)
- 10*35/5-5=65
- 5 years agoHelpfull: Yes(0) No(0)
Accenture Other Question