Computer Applications
Consider the given array and answer the questions given below:
int x[ ] = {4, 7, 9, 66, 72, 0, 16};
(a) What is the length of the array?
(b) What is the value in x[4]?
Java Arrays
ICSE 2023
32 Likes
Answer
(a) 7
(b) 72
Answered By
23 Likes
Related Questions
Give the output of the following program segment:
int n = 4279; int d; while(n > 0) { d = n % 10; System.out.println(d); n = n / 100; }Give the output of the following String class methods:
(a) "COMMENCEMENT".lastIndexOf('M')
(b) "devote".compareTo("DEVOTE")
Name the following:
(a) What is an instance of the class called?
(b) The method which has same name as that of the class name.
Write the value of n after execution:
char ch ='d'; int n = ch + 5;