adplus-dvertising
frame-decoration

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++;
            }
        } 
    }

a.

i i i i i

b.

0 1 2 3 4

c.

i j k l m

d.

None of the mentioned

Posted under Java Programming

Answer: (a).i i i i i

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of this program?