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
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
Chemistry,
3 months ago
Science,
3 months ago
English,
6 months ago
English,
6 months ago
Business Studies,
10 months ago
Social Sciences,
10 months ago
Math,
10 months ago