Computer Science, asked by killerclasher418, 6 months ago

8. What will be the output of the following codes:-
M=8 is a positive integer
void fun( int m)
{
while(m> 0)
{
m=m/10;
System.out.println("m will be="+m);
}
}​​

Answers

Answered by sbmjagadish
0

Answer:

hello

Explanation:

java is a case sensitive language...

if u take m=8...then your output shall be 8/10=0.8

as it's integer so...it will only be 0....so ur final output is:

m will be = 0

it will further not loop...coz the condition will not satisfy....as m will change to 0 and 0is not >0 so...

✌️✌️

Similar questions