+ 1
Evalute the expressoon for i=5,j=10. Also writte the final values of S,O,&J for each expression:a)S=++i +++ i--/j
b)S=i++ + i++ + ++i + i-- c)S=(i++ + j++)/(--i+ --j)
3 Answers
+ 2
Step by step:
a) You probably made a mistake when copying the line.
b)
S = i++ + i++ + ++i + i-- (i = 5)
S = 5 + i++ + ++i + i-- (i = 6)
S = 5 + 6 + ++i + i-- (i = 7)
S = 5 + 6 + 8 + i-- (i = 8)
S = 5 + 6 + 8 + 8 (i = 7)
S = 27 (i = 7)
c)
S=(i++ + j++)/(--i+ --j) (i = 5, j = 10)
S=(5 + 10)/(--i+ --j) (i = 6, j = 11)
S=(5 + 10)/(5 + 10) (i = 5, j = 10)
S = 1 (i = 5, j = 10)
+ 1
a) Synthax error
b) i = 7, j = 10, S = 27
c) i = 5, j = 10, S = 1
0
please explain.......!!!!!!!