Home / CSE MCQs / JAVA MCQs :: Discussion

Discussion :: JAVA MCQs

  1. What is the output of this program?
    class mainclass {
    public static void main(String args[]) 
    {
    char a = 'A';
    a++;
    System.out.print((int)a);
    }
  2. A.
    66
    B.
    67
    C.
    65
    D.
    64

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    ASCII value of 'A' is 65, on using ++ operator character value increments by one.


Be The First To Comment