Core Java - Interview Questions and Answers for 'Ascii' | Search Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com

Search Interview Questions


 More than 3000 questions in repository.
 There are more than 900 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Core Java - Interview Questions and Answers for 'Ascii' - 4 question(s) found - Order By Rating

 Q1. What are ascii values for capital and lower case alphabets ?Core Java
Ans. 65 to 90 for capital case alphabets

97 to 122 for lower case alphabets

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     ascii  character  char


 Q2. How many bits are used to represent Unicode, ASCII, UTF-16, and UTF-8 characters?
Ans. Unicode requires 16 bits and ASCII require 7 bits. Although the ASCII character set uses only 7 bits, it is usually represented as 8 bits. UTF-8 represents characters using 8, 16, and 18 bit patterns. UTF-16 uses 16-bit and larger bit patterns.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     character coding   ascii   unicode   utf

Try 1 Question(s) Test


 Q3. What will be the output of following code ?

System.out.println((int)'a');
Ans. The ascii value of a i.e 97

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     character  ascii


 Q4. What will be the output of

System.out.println((Integer)'a');
Ans. It will result in compilation error as primitive char cannot be casted to Integer object, alternatively we can cast it to primitive int like following

System.out.println((int)'a');

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     character  ascii



Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: