Answer: Option B
A. 0
Answer: Option A
A. The program has a compile error because the size of the array wasn't specified when declaring
the array.
B. The program has a runtime error because the array elements are not initialized.
C. The program runs fine and displays x[0] is 0.
D. The program has a runtime error because the array element x[0] is not defined.
Answer: Option C
Answer: Option C
Answer: Option D
Answer: a
Which of these operators is used to allocate memory to array variable in Java?
a) malloc
b) alloc
c) new
d) new malloc
Answer: c
Datatypes
B. strongly typed
C. moderate typed
D. None of these
Answer: Option B
A. 6
B. 7
C. 8
D. 9
Answer: Option C
D. None of these
Answer: Option A
B. 32 bit
C. 64 bit
The smallest integer type is ......... and its size is ......... bits.
A. short, 8
B. byte, 8
C. short, 16
D. short, 16
Answer: Option B
A. 32 and 64
B. 64 and 64
C. 32 and 32
D. 64 and 32
Answer: Option A
A. Two type are compatible and size of destination type is shorter than source type.
B. Two type are compatible and size of destination type is equal of source type.
C. Two type are compatible and size of destination type is larger than source type.
A. short to int
B. byte to int
C. int to long
D. long to int
Answer: Option D
B. A Boolean literal
C. Same as value 1
D. Same as value 0
Answer: Option B
Answer: c