InterviewSolution
Saved Bookmarks
| 1. |
Can someone plz explain me this it is of java and output is coming 126 why?? |
|
Answer» ong>Explanation: Here m++ and n++ are POSTFIX operators so they will increase m and n by 1 but after the CALCULATION m++×n++ is performed so here 10×12=120. Now the value of n has been increased by 1 by postfix plus so n=12+1=13. and --n this is PREFIX SUBTRACTION so it will reduce the value of n by 1 before the calculation IS finished so n=13-1=12 then n/2=12/2=6 120+6=126 |
|