+ 3

Solve this plz...with steps

if a=7 a = ++a + a/3 + 6;

13th Feb 2017, 12:40 PM
Dolu
Dolu - avatar
2 Answers
+ 5
1. Check the priority of operators. 2. Increment has highest priority, then division, then binary addition then assignment operator. 3. a = ++7 + a/3 + 6, a value will be incremented by 1, so a=8 4. a = 8 + 8/3 + 6 5. a = 8 + 2 + 6 6. a = 16
13th Feb 2017, 1:50 PM
Kommoju Sunil Kumar
Kommoju Sunil Kumar - avatar
+ 3
thanks
13th Feb 2017, 2:00 PM
Dolu
Dolu - avatar