Question: Suppose int x = 3 2 6 4 . What is the output of the following code? int y = x % 1 0 ;

Suppose int x =3264. What is the output of the following code?
int y = x %10;
x = x /10;
System.out.println("x is "+ x +" and y is "+ y);
x is 3264 and y is 326.4
x is 3264 and y is 4
x is 4 and y is 326
x is 326 and y is 326
x is 326 and y is 4

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!