ExamVeda
Login
Home
Data Types and Variables
?

What will be the output of the following Java program?
class array_output 
{
    public static void main(String args[]) 
    {
        int array_variable [] = new int[10];
  for (int i = 0; i < 10; ++i) {
            array_variable[i] = i/2;
            array_variable[i]++;
            System.out.print(array_variable[i] + " ");
            i++;
        }

    } 
}

Answer & Solution
Correct Answer: Option B
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.