Home » JAVA Programming » Basic Datatypes » Question
  1. What is the output of this program?

    class output {
    public static void main(String args[])
    {
    char a = 'A';
    a++;
    System.out.print((int)a);
    }
    }

    1. 61
    2. 64
    3. 65
    4. 63
    5. 66
Correct Option: E

ASCII value of ‘A’ is 65, on using ++ operator character value increments by one.
output: 66



Your comments will be displayed only after manual approval.