Sail E0 Webinar
Question


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++;
}
}
}
Options:
A .  i i i i i
B .  0 1 2 3 4
C .  i j k l m
D .  None of the mentioned
Answer: Option A

None.
output:
$ javac array_output.java
$ java array_output
i i i i i



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers