What is the output of this program?
class mainclass
{

Home | Discussion Forum

What is the output of this program?

class mainclass
{
public static void main(String args[])
{
char a = 'A';
a++;
System.out.print((int)a);
}
}

View More Related Question

2) What will be the output of these statement?

class output
{
public static void main(String args[])
{
double a, b,c;
a = 3.0/0;
b = 0/4.0;
c=0/0.0;
System.out.println(a);
System.out.println(b);
System.out.println(c);
}
}

3) What is the output of this program?

class evaluate
{
public static void main(String args[])
{
int a[] = {1,2,3,4,5};
int d[] = a;
int sum = 0;
for (int j = 0; j < 3; ++j)
sum += (a[j] * d[j + 1]) + (a[j + 1] * d[j]);
System.out.println(sum);
}
}

4) What will the output of the following program?

public class Test{
public static void main(String args[])
{
float f = (1 / 4) * 10;
int i = Math.round(f);
System.out.println(i);
}
}

5) What is the output of this program?

class dynamic_initialization
{
public static void main(String args[])
{
double a, b;
a = 3.0;
b = 4.0;
double c = Math.sqrt(a * a + b * b);
System.out.println(c);
}
}

UP Gk Online Test

taiyari24hour.com

Study 2 Online Says....
Kindly log in or signup.