+ 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)

12th Oct 2016, 1:36 PM
SAMBHAV KUMAR THAKUR
SAMBHAV KUMAR THAKUR - avatar
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)
14th Oct 2016, 9:43 AM
Zen
Zen - avatar
+ 1
a) Synthax error b) i = 7, j = 10, S = 27 c) i = 5, j = 10, S = 1
12th Oct 2016, 2:08 PM
Zen
Zen - avatar
0
please explain.......!!!!!!!
13th Oct 2016, 5:01 PM
SAMBHAV KUMAR THAKUR
SAMBHAV KUMAR THAKUR - avatar