adplus-dvertising
frame-decoration

Question

What is the output of this program?
    class char_increment 
    {
        public static void main(String args[]) 
        {
            char c1 = 'D';
            char c2 = 84;
            c2++;
            c1++;
            System.out.println(c1 + " "  + c2);
        } 
    }

a.

E U

b.

U E

c.

V E

d.

U F

Posted under Java Programming

Answer: (a).E U

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?