Computer Science, asked by AARUSHI05, 1 year ago

What will be the output of the following if x=5
1. 5*++x
2. 5*x++
urgent !!

Answers

Answered by 1Rubin1
8
1. 30
since, the increment is done before so ++x changed to 6 and result is 6*5

2. 25
since, increment is done after so value of x++ is still 5 so result is 5*5


1Rubin1: m = 5 -2 = 3
AARUSHI05: ohk
AARUSHI05: and if u r free
AARUSHI05: just last 1
AARUSHI05: int n=1 ;n*=9
1Rubin1: yes ask
1Rubin1: n = n * 9 = 1 * 9 = 9
AARUSHI05: system.out.println("the output=" =n)
1Rubin1: answer is 9
AARUSHI05: thanks buddy
Similar questions