Advertisements
Advertisements
प्रश्न
State the number of bytes occupied by char and int data types.
Advertisements
उत्तर
The char data occupies two bytes whereas int data type occupies four bytes.
APPEARS IN
संबंधित प्रश्न
Give the output of the following code:
String P = “20”, Q = “19”,
int a = Integer .parselnt(P);
int b = Integer. valueOf(Q);
System.out.println(a+””+b);
State the data type and value of res after the following is executed:
char ch = ‘t’;
res=Character. toUpperCase(ch);
Write a difference between the functions isUpperCase() and toUpperCase().
int res = ‘A’;
What is the value of res?
State one difference between the floating point literals float and double.
What will be the output when the following code segment is executed?
System.out.println(“The king said\”Begin at the beginning!\“to me.”);
Predict the output of the following code snippet: String P = "20", Q = "22";
int a = Integer.parseInt(P);
int b = Integer.value0f(Q);
System.out.println(a + " " + b);
Give the output of the following Character class method:
Character.isLetterOrDigit('W')Write the value of n after execution:
char ch = 'd';
int n = ch + 5;What is the method to check whether a character is a letter or digit?
