Java MCQ - English
What is the output of this program?
class mainclass
{
public static void main(String args[])
{
char a = 'A';
a++;
System.out.print((int)a);
}
}
Answer : A
View More Related Question
1) What is the output of this program?
class increment
{
public static void main(String args[])
{
int g = 3;
System.out.print(++g * 8);
}
}
2) What is the output of this program?
class booloperators
{
public static void main(String args[])
{
boolean var1 = true;
boolean var2 = false;
System.out.println((var2 & var2));
}
}
3) What is the output of this program?
class array_output
{
public static void main(String args[])
{
char array_variable [] = new char[10];
for (int i = 0; i < 10; ++i)
{
array_variable[i] = 'i';
System.out.print(array_variable[i] + "" );
i++;
}
}
}
4) 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);
}
}
5) What is the output of this program?
class mainclass
{
public static void main(String args[])
{
char a = 'A';
a++;
System.out.print((int)a);
}
}