What is the output of this program?
class Modulus
{
Home | Discussion Forum

What is the output of this program?

class Modulus
{
public static void main(String args[])
{
double a = 25.64;
int b = 25;
a = a % 10;
b = b % 10;
System.out.println(a + " " + b);
}
}

View More Related Question

1) What will be the output?

public class Test
{
public static void main(String args[])
{
int a = 42;
double b = 42.25;
System.out.print((a%10)+" "+(b%10));
}
}

2) What is the output of this program?

class Output
{
public static void main(String args[])
{
int a = 1;
int b = 2;
int c;
int d;
c = ++b;
d = a++;
c++;
b++;
++a;
System.out.println(a + " " + b + " " + c);
}
}

3) What is the output of this program?

class increment
{
public static void main(String args[])
{
int g = 3;
System.out.print(++g * 8);
}
}

4) What will be the output?

if(1 + 1 + 1 + 1 + 1 == 5)
{
System.out.print("TRUE");
}
else
{
System.out.print("FLASE");
}

5) What is the output of this program?

class increment
{
public static void main(String args[])
{
double var1 = 1 + 5;
double var2 = var1 / 4;
int var3 = 1 + 5;
int var4 = var3 / 4;
System.out.print(var2 + " " + var4);
}
}

UP Gk Online Test

taiyari24hour.com