Computer Applications
Arrange in descending order of byte size the following values:
'c', 94.245, true, 50
Values & Data Types Java
18 Likes
Answer
94.245, 50, 'c', true
Explanation
- 94.245 is a double and its size is 8 bytes.
- 50 is an int and its size is 4 bytes.
- 'c' is a char and its size is 2 bytes.
- true is a boolean and its size is 1 byte.
Answered By
8 Likes
Related Questions
Consider the following program segment in which the statements are jumbled, choose the correct order of statements to swap two variables using the third variable.
void swap(int a, int b) { a = b; → (1) b = t; → (2) int t = 0; → (3) t = a; → (4) }- (1) (2) (3) (4)
- (3) (4) (1) (2)
- (1) (3) (4) (2)
- (2) (1) (4) (3)
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
The default value of a boolean variable is:
- False
- 0
- false
- True