A c program contains the declaration and initial assignments: int i=8,j=5; float x=0.005,y=-0.01; char C='C', d='d' ; the value of arithmetic expression ( 2*(i/5)+(4*j-3)%(i=j-2) is
Answers
Answered by
0
Answer:
it answer may be 17 , not sure
Answered by
1
Expression :
2 * (i / 5) + (4 * j - 3) % (i = j - 2)
2 * (8 / 5) + (4 * 5 - 3) % (i = 5 - 2)
2 * 1 + (20 - 3) % (i = 3)
2 * 1 + 17 % 3
2 + 2
4
The value of arithmetic expression is 4.
(2 * (i / 5) + (4 * j - 3)) % (i = j - 2)
(2 * (8 / 5) + (4 * 5 - 3)) % (i = 5 - 2)
(2 * 1 + (20 - 3)) % (i = 3)
(2 * 1 + 17) % 3
(2 + 17) % 3
19 % 3
1
The value of arithmetic expression is 1.
There was some problem with brackets in the expression therefore two solutions are provided.
Similar questions