मराठी

Consider the array given below: char ch[]={'A','E',T,'O','U'}; Write the output of the following statements: System.out.println(ch[0]*2);; - Computer Applications

Advertisements
Advertisements

प्रश्न

Consider the array given below:

char ch[]={'A','E','I','O','U'};

Write the output of the following statements:

System.out.println(ch[0]*2);;

पर्याय

  • 65

  • 130

  • 'A'

  • 0

MCQ
Advertisements

उत्तर

130

Explanation:

  • In Java, characters are represented using their ASCII values.
  • The ASCII value of 'A' is 65. When ch[0]*2 is executed, it multiplies the ASCII value of 'A' (which is 65) by 2, resulting in 130.
shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
2024-2025 (March) Specimen Paper
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×